nuxt-schema-org 5.0.1 → 5.0.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/client/200.html +5 -5
- package/dist/client/404.html +5 -5
- package/dist/client/_nuxt/{DF3WsVs5.js → BcPhSJxU.js} +1 -1
- package/dist/client/_nuxt/{B9gciWwv.js → CgGSSGCG.js} +1 -1
- package/dist/client/_nuxt/{D49R63WH.js → DiWZrkno.js} +3 -3
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/2b563cbd-2bcc-4694-8e01-f54f61f2dd05.json +1 -0
- package/dist/client/index.html +5 -5
- package/dist/module.json +1 -1
- package/dist/runtime/app/plugins/defaults.js +7 -4
- package/dist/runtime/app/plugins/i18n/defaults.js +6 -3
- package/dist/runtime/app/utils/shared.js +10 -6
- package/package.json +5 -9
- package/dist/client/_nuxt/builds/meta/40c44dc2-35a7-4c37-9a3e-3fef68c238cb.json +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"
|
|
1
|
+
{"id":"2b563cbd-2bcc-4694-8e01-f54f61f2dd05","timestamp":1741648577987}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"id":"2b563cbd-2bcc-4694-8e01-f54f61f2dd05","timestamp":1741648577987,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
|
package/dist/client/index.html
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
<!DOCTYPE html><html><head><meta charset="utf-8">
|
|
2
2
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
3
3
|
<link rel="stylesheet" href="/__nuxt-schema-org/_nuxt/entry.C6QaoFy4.css" crossorigin>
|
|
4
|
-
<link rel="modulepreload" as="script" crossorigin href="/__nuxt-schema-org/_nuxt/
|
|
4
|
+
<link rel="modulepreload" as="script" crossorigin href="/__nuxt-schema-org/_nuxt/DiWZrkno.js">
|
|
5
5
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-schema-org/_nuxt/CVO1_9PV.js">
|
|
6
6
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-schema-org/_nuxt/D0r3Knsf.js">
|
|
7
7
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-schema-org/_nuxt/ySlJ1b_l.js">
|
|
8
8
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-schema-org/_nuxt/DTAJTTim.js">
|
|
9
9
|
<link rel="prefetch" as="style" crossorigin href="/__nuxt-schema-org/_nuxt/error-404.xH3Cf7mp.css">
|
|
10
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-schema-org/_nuxt/
|
|
10
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-schema-org/_nuxt/CgGSSGCG.js">
|
|
11
11
|
<link rel="prefetch" as="style" crossorigin href="/__nuxt-schema-org/_nuxt/error-500.D1eGBBaO.css">
|
|
12
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-schema-org/_nuxt/
|
|
13
|
-
<script type="module" src="/__nuxt-schema-org/_nuxt/
|
|
14
|
-
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-schema-org",buildId:"
|
|
12
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-schema-org/_nuxt/BcPhSJxU.js">
|
|
13
|
+
<script type="module" src="/__nuxt-schema-org/_nuxt/DiWZrkno.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1741648583376,false]</script>
|
|
14
|
+
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-schema-org",buildId:"2b563cbd-2bcc-4694-8e01-f54f61f2dd05",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
|
package/dist/module.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { useSiteConfig } from "#site-config/app/composables/useSiteConfig";
|
|
2
2
|
import { defineWebPage, defineWebSite } from "@unhead/schema-org/vue";
|
|
3
3
|
import { defineNuxtPlugin } from "nuxt/app";
|
|
4
|
+
import { toValue } from "vue";
|
|
4
5
|
import { useSchemaOrg } from "../composables/useSchemaOrg.js";
|
|
5
6
|
import { maybeAddIdentitySchemaOrg } from "../utils/shared.js";
|
|
6
7
|
export default defineNuxtPlugin({
|
|
@@ -9,12 +10,14 @@ export default defineNuxtPlugin({
|
|
|
9
10
|
"nuxt-schema-org:init"
|
|
10
11
|
],
|
|
11
12
|
setup() {
|
|
12
|
-
const siteConfig = useSiteConfig(
|
|
13
|
+
const siteConfig = useSiteConfig({
|
|
14
|
+
resolveRefs: true
|
|
15
|
+
});
|
|
13
16
|
useSchemaOrg([
|
|
14
17
|
defineWebSite({
|
|
15
|
-
name: siteConfig
|
|
16
|
-
inLanguage: siteConfig
|
|
17
|
-
description: siteConfig
|
|
18
|
+
name: toValue(siteConfig.name) || "",
|
|
19
|
+
inLanguage: toValue(siteConfig.currentLocale) || "",
|
|
20
|
+
description: toValue(siteConfig.description) || ""
|
|
18
21
|
}),
|
|
19
22
|
defineWebPage()
|
|
20
23
|
]);
|
|
@@ -7,6 +7,7 @@ import { defineWebPage, defineWebSite } from "@unhead/schema-org/vue";
|
|
|
7
7
|
import { resolveSitePath } from "nuxt-site-config/urls";
|
|
8
8
|
import { defineNuxtPlugin, useRuntimeConfig } from "nuxt/app";
|
|
9
9
|
import { hasProtocol, withHttps } from "ufo";
|
|
10
|
+
import { toValue } from "vue";
|
|
10
11
|
import { useSchemaOrg } from "../../composables/useSchemaOrg.js";
|
|
11
12
|
import { maybeAddIdentitySchemaOrg } from "../../utils/shared.js";
|
|
12
13
|
export default defineNuxtPlugin({
|
|
@@ -15,7 +16,9 @@ export default defineNuxtPlugin({
|
|
|
15
16
|
"nuxt-schema-org:init"
|
|
16
17
|
],
|
|
17
18
|
setup(nuxtApp) {
|
|
18
|
-
const siteConfig = useSiteConfig(
|
|
19
|
+
const siteConfig = useSiteConfig({
|
|
20
|
+
resolveRefs: true
|
|
21
|
+
});
|
|
19
22
|
const pathResolver = createSitePathResolver({
|
|
20
23
|
canonical: true,
|
|
21
24
|
absolute: true
|
|
@@ -29,8 +32,8 @@ export default defineNuxtPlugin({
|
|
|
29
32
|
const website = defineWebSite({
|
|
30
33
|
"@id": websiteId,
|
|
31
34
|
"url": siteUrl,
|
|
32
|
-
"name": siteConfig
|
|
33
|
-
"inLanguage": nuxtApp.$i18n.localeProperties.value.language || "",
|
|
35
|
+
"name": siteConfig.name || "",
|
|
36
|
+
"inLanguage": toValue(nuxtApp.$i18n.localeProperties.value.language) || "",
|
|
34
37
|
"description": siteConfig.description || ""
|
|
35
38
|
});
|
|
36
39
|
const nuxtBase = useRuntimeConfig().app.baseURL || "/";
|
|
@@ -7,15 +7,17 @@ import { SchemaOrgUnheadPlugin } from "@unhead/schema-org/vue";
|
|
|
7
7
|
import { defu } from "defu";
|
|
8
8
|
import { useRoute } from "nuxt/app";
|
|
9
9
|
import { camelCase } from "scule";
|
|
10
|
-
import {
|
|
11
|
-
import { computed } from "vue";
|
|
10
|
+
import { withTrailingSlash } from "ufo";
|
|
11
|
+
import { computed, toValue } from "vue";
|
|
12
12
|
import { useSchemaOrg } from "../composables/useSchemaOrg.js";
|
|
13
13
|
import { useSchemaOrgConfig } from "./config.js";
|
|
14
14
|
export function initPlugin(nuxtApp) {
|
|
15
15
|
const head = injectHead();
|
|
16
16
|
const config = useSchemaOrgConfig();
|
|
17
17
|
const route = useRoute();
|
|
18
|
-
const siteConfig = useSiteConfig(
|
|
18
|
+
const siteConfig = useSiteConfig({
|
|
19
|
+
resolveRefs: true
|
|
20
|
+
});
|
|
19
21
|
const resolvePath = createSitePathResolver({
|
|
20
22
|
absolute: false,
|
|
21
23
|
withBase: true
|
|
@@ -30,8 +32,8 @@ export function initPlugin(nuxtApp) {
|
|
|
30
32
|
...route.meta?.schemaOrg || {},
|
|
31
33
|
...siteConfig,
|
|
32
34
|
url: resolveUrl(route.path),
|
|
33
|
-
host:
|
|
34
|
-
inLanguage: siteConfig.currentLocale || siteConfig.defaultLocale,
|
|
35
|
+
host: withTrailingSlash(siteConfig.url),
|
|
36
|
+
inLanguage: toValue(siteConfig.currentLocale) || toValue(siteConfig.defaultLocale),
|
|
35
37
|
path: resolvePath(route.path)
|
|
36
38
|
};
|
|
37
39
|
});
|
|
@@ -51,7 +53,9 @@ export function initPlugin(nuxtApp) {
|
|
|
51
53
|
}
|
|
52
54
|
export function maybeAddIdentitySchemaOrg() {
|
|
53
55
|
const config = useSchemaOrgConfig();
|
|
54
|
-
const siteConfig = useSiteConfig(
|
|
56
|
+
const siteConfig = useSiteConfig({
|
|
57
|
+
resolveRefs: true
|
|
58
|
+
});
|
|
55
59
|
if (config.identity || siteConfig.identity) {
|
|
56
60
|
const identity = config.identity || siteConfig.identity;
|
|
57
61
|
let identityPayload = {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-schema-org",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.0.
|
|
4
|
+
"version": "5.0.3",
|
|
5
5
|
"description": "The quickest and easiest way to build Schema.org graphs for Nuxt.",
|
|
6
6
|
"author": "Harlan Wilton <harlan@harlanzw.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -53,13 +53,9 @@
|
|
|
53
53
|
"dist",
|
|
54
54
|
"schema.d.ts"
|
|
55
55
|
],
|
|
56
|
-
"peerDependencies": {
|
|
57
|
-
"@unhead/vue": "^2.0.0-rc.1",
|
|
58
|
-
"nuxt": "^3.16.0"
|
|
59
|
-
},
|
|
60
56
|
"dependencies": {
|
|
61
57
|
"@nuxt/kit": "^3.16.0",
|
|
62
|
-
"@unhead/schema-org": "^2.0.0-rc.
|
|
58
|
+
"@unhead/schema-org": "^2.0.0-rc.9",
|
|
63
59
|
"defu": "^6.1.4",
|
|
64
60
|
"nuxt-site-config": "^3.1.4",
|
|
65
61
|
"pathe": "^2.0.3",
|
|
@@ -71,9 +67,9 @@
|
|
|
71
67
|
"@nuxt/content": "^3.3.0",
|
|
72
68
|
"@nuxt/module-builder": "^0.8.4",
|
|
73
69
|
"@nuxt/schema": "^3.16.0",
|
|
74
|
-
"@nuxt/test-utils": "^3.17.
|
|
75
|
-
"@nuxt/ui": "^2.21.
|
|
76
|
-
"@nuxtjs/i18n": "^9.3.
|
|
70
|
+
"@nuxt/test-utils": "^3.17.2",
|
|
71
|
+
"@nuxt/ui": "^2.21.1",
|
|
72
|
+
"@nuxtjs/i18n": "^9.3.1",
|
|
77
73
|
"@nuxtjs/robots": "^5.2.6",
|
|
78
74
|
"bumpp": "^10.0.3",
|
|
79
75
|
"cheerio": "^1.0.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"id":"40c44dc2-35a7-4c37-9a3e-3fef68c238cb","timestamp":1741533734822,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
|