nuxt-schema-org 0.1.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/module.json CHANGED
@@ -4,5 +4,5 @@
4
4
  "bridge": true
5
5
  },
6
6
  "name": "nuxt-schema-org",
7
- "version": "0.1.1"
7
+ "version": "0.3.0"
8
8
  }
@@ -1,12 +1,17 @@
1
1
  import { createSchemaOrg } from "@vueuse/schema-org";
2
2
  import { defineNuxtPlugin } from "#app";
3
- import { useHead, useRoute } from "#imports";
3
+ import { useRoute, watchEffect } from "#imports";
4
4
  import meta from "#build/schemaOrg.config.mjs";
5
5
  export default defineNuxtPlugin((nuxtApp) => {
6
+ const head = nuxtApp.vueApp._context.provides.usehead;
6
7
  const schemaOrg = createSchemaOrg({
7
- useHead,
8
8
  useRoute,
9
+ head,
9
10
  ...meta.config
10
11
  });
11
12
  nuxtApp.vueApp.use(schemaOrg);
13
+ schemaOrg.setupDOM();
14
+ watchEffect(() => {
15
+ schemaOrg.generateSchema();
16
+ });
12
17
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-schema-org",
3
- "version": "0.1.1",
3
+ "version": "0.3.0",
4
4
  "description": "Nuxt module for @vueuse/schema-org",
5
5
  "keywords": [
6
6
  "schema-org",
@@ -36,7 +36,7 @@
36
36
  },
37
37
  "dependencies": {
38
38
  "@nuxt/kit": "^3.0.0-rc.1",
39
- "@vueuse/schema-org": "0.1.1"
39
+ "@vueuse/schema-org": "0.3.0"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@nuxt/module-builder": "latest",
@@ -47,6 +47,5 @@
47
47
  "play": "nuxi dev ../../playgrounds/nuxt3",
48
48
  "play:build": "nuxi build ../../playgrounds/nuxt3",
49
49
  "stub": "nuxt-module-build --stub && nuxi prepare ../../playgrounds/nuxt3"
50
- },
51
- "readme": "# nuxt-schema-org\n\nThe Nuxt.js integration for [@vueuse/schema-org](https://github.com/vueuse/schema-org).\n\n## Install\n\n```bash\n# NPM\nnpm install -D nuxt-schema-org\n# or Yarn\nyarn add -D nuxt-schema-org\n# or PNPM\npnpm add -D nuxt-schema-org\n```\n\n## Setup Module\n\nFind documentation in the [Nuxt Setup](https://vue-schema-org.netlify.app/guide/setup/nuxt.html) guide\n\n## License\n\nMIT License © 2022-PRESENT [Harlan Wilton](https://github.com/harlan-zw)\n"
50
+ }
52
51
  }