nuxt-schema-org 3.1.2 → 3.1.3
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 +1 -1
- package/dist/runtime/plugin.mjs +5 -5
- package/package.json +3 -3
package/dist/module.json
CHANGED
package/dist/runtime/plugin.mjs
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { SchemaOrgUnheadPlugin } from "@unhead/schema-org";
|
|
2
2
|
import { joinURL } from "ufo";
|
|
3
3
|
import { computed } from "vue";
|
|
4
|
-
import { defineNuxtPlugin, injectHead, useHead,
|
|
4
|
+
import { defineNuxtPlugin, injectHead, useHead, useRoute, useRuntimeConfig, useSiteConfig } from "#imports";
|
|
5
5
|
export default defineNuxtPlugin({
|
|
6
6
|
name: "nuxt-schema-org:init",
|
|
7
7
|
enforce: "post",
|
|
8
8
|
setup(nuxtApp) {
|
|
9
9
|
const head = injectHead();
|
|
10
10
|
const config = useRuntimeConfig().public["nuxt-schema-org"];
|
|
11
|
-
const
|
|
11
|
+
const route = useRoute();
|
|
12
12
|
const siteConfig = useSiteConfig();
|
|
13
13
|
const schemaOrg = computed(() => {
|
|
14
14
|
return {
|
|
15
|
-
...
|
|
15
|
+
...route.meta,
|
|
16
16
|
...siteConfig,
|
|
17
|
-
url: joinURL(siteConfig.url,
|
|
17
|
+
url: joinURL(siteConfig.url, route.path),
|
|
18
18
|
host: siteConfig.url,
|
|
19
19
|
inLanguage: siteConfig.currentLocale || siteConfig.defaultLocale,
|
|
20
|
-
path:
|
|
20
|
+
path: route.path
|
|
21
21
|
};
|
|
22
22
|
});
|
|
23
23
|
useHead({
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-schema-org",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.1.
|
|
5
|
-
"packageManager": "pnpm@8.10.
|
|
4
|
+
"version": "3.1.3",
|
|
5
|
+
"packageManager": "pnpm@8.10.2",
|
|
6
6
|
"description": "Schema.org for Nuxt",
|
|
7
7
|
"author": "Harlan Wilton <harlan@harlanzw.com>",
|
|
8
8
|
"license": "MIT",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"sirv": "^2.0.3"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@antfu/eslint-config": "^1.
|
|
49
|
+
"@antfu/eslint-config": "^1.1.0",
|
|
50
50
|
"@nuxt/module-builder": "^0.5.2",
|
|
51
51
|
"@nuxt/schema": "^3.8.0",
|
|
52
52
|
"@nuxt/test-utils": "^3.8.0",
|