@nuxtjs/sitemap 7.4.8 → 7.4.10
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 +1 -1
- package/dist/client/404.html +1 -1
- package/dist/client/_nuxt/{BD3NqoLn.js → CjT5ejtq.js} +1 -1
- package/dist/client/_nuxt/{CGPPaMu7.js → DBmpb9dG.js} +1 -1
- package/dist/client/_nuxt/{HdjdXzAy.js → FE81ed4p.js} +14 -16
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/698c1660-7b4c-4db3-a9a5-6c0e6240b3a7.json +1 -0
- package/dist/client/_nuxt/error-404.DC9fsYfS.css +1 -0
- package/dist/client/_nuxt/error-500.DPVweS-0.css +1 -0
- package/dist/client/index.html +1 -1
- package/dist/client/sitemap.xml +1 -1
- package/dist/content.d.mts +36 -37
- package/dist/content.d.ts +36 -37
- package/dist/content.mjs +1 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +38 -28
- package/dist/runtime/server/plugins/nuxt-content-v2.js +6 -7
- package/dist/runtime/server/routes/__sitemap__/debug.js +3 -2
- package/dist/runtime/server/routes/__sitemap__/nuxt-content-urls-v2.d.ts +1 -1
- package/dist/runtime/server/routes/__sitemap__/nuxt-content-urls-v3.d.ts +3 -1
- package/dist/runtime/server/routes/__sitemap__/nuxt-content-urls-v3.js +7 -6
- package/dist/runtime/server/routes/sitemap/[sitemap].xml.js +1 -1
- package/dist/runtime/server/sitemap/builder/sitemap.js +67 -74
- package/dist/runtime/server/sitemap/builder/xml.js +81 -169
- package/dist/runtime/server/sitemap/nitro.js +4 -3
- package/dist/runtime/server/sitemap/urlset/normalise.js +29 -26
- package/dist/runtime/types.d.ts +8 -2
- package/dist/runtime/utils-pure.js +1 -1
- package/dist/utils.mjs +1 -2
- package/package.json +21 -13
- package/dist/client/_nuxt/builds/meta/61bb4b51-7d01-424f-91fb-0e4ca01f7b22.json +0 -1
- package/dist/client/_nuxt/error-404.i2ufnNET.css +0 -1
- package/dist/client/_nuxt/error-500.CIrNTbBE.css +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"
|
|
1
|
+
{"id":"698c1660-7b4c-4db3-a9a5-6c0e6240b3a7","timestamp":1765851593006}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"id":"698c1660-7b4c-4db3-a9a5-6c0e6240b3a7","timestamp":1765851593006,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.grid[data-v-a1a1b88d]{display:grid}.mb-2[data-v-a1a1b88d]{margin-bottom:.5rem}.mb-4[data-v-a1a1b88d]{margin-bottom:1rem}.max-w-520px[data-v-a1a1b88d]{max-width:520px}.min-h-screen[data-v-a1a1b88d]{min-height:100vh}.w-full[data-v-a1a1b88d]{width:100%}.flex[data-v-a1a1b88d]{display:flex}.place-content-center[data-v-a1a1b88d]{place-content:center}.items-center[data-v-a1a1b88d]{align-items:center}.justify-center[data-v-a1a1b88d]{justify-content:center}.overflow-hidden[data-v-a1a1b88d]{overflow:hidden}.bg-white[data-v-a1a1b88d]{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.px-2[data-v-a1a1b88d]{padding-left:.5rem;padding-right:.5rem}.text-center[data-v-a1a1b88d]{text-align:center}.text-\[80px\][data-v-a1a1b88d]{font-size:80px}.text-2xl[data-v-a1a1b88d]{font-size:1.5rem;line-height:2rem}.text-sm[data-v-a1a1b88d]{font-size:.875rem;line-height:1.25rem}.text-\[\#020420\][data-v-a1a1b88d]{--un-text-opacity:1;color:rgb(2 4 32/var(--un-text-opacity))}.text-\[\#64748B\][data-v-a1a1b88d]{--un-text-opacity:1;color:rgb(100 116 139/var(--un-text-opacity))}.hover\:text-\[\#00DC82\][data-v-a1a1b88d]:hover{--un-text-opacity:1;color:rgb(0 220 130/var(--un-text-opacity))}.font-medium[data-v-a1a1b88d]{font-weight:500}.font-semibold[data-v-a1a1b88d]{font-weight:600}.leading-none[data-v-a1a1b88d]{line-height:1}.tracking-wide[data-v-a1a1b88d]{letter-spacing:.025em}.font-sans[data-v-a1a1b88d]{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.tabular-nums[data-v-a1a1b88d]{--un-numeric-spacing:tabular-nums;font-variant-numeric:var(--un-ordinal) var(--un-slashed-zero) var(--un-numeric-figure) var(--un-numeric-spacing) var(--un-numeric-fraction)}.underline[data-v-a1a1b88d]{text-decoration-line:underline}.underline-offset-3[data-v-a1a1b88d]{text-underline-offset:3px}.antialiased[data-v-a1a1b88d]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media(prefers-color-scheme:dark){.dark\:bg-\[\#020420\][data-v-a1a1b88d]{--un-bg-opacity:1;background-color:rgb(2 4 32/var(--un-bg-opacity))}.dark\:text-white[data-v-a1a1b88d]{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media(min-width:640px){.sm\:text-\[110px\][data-v-a1a1b88d]{font-size:110px}.sm\:text-3xl[data-v-a1a1b88d]{font-size:1.875rem;line-height:2.25rem}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.grid[data-v-7d8562ed]{display:grid}.mb-2[data-v-7d8562ed]{margin-bottom:.5rem}.mb-4[data-v-7d8562ed]{margin-bottom:1rem}.max-w-520px[data-v-7d8562ed]{max-width:520px}.min-h-screen[data-v-7d8562ed]{min-height:100vh}.place-content-center[data-v-7d8562ed]{place-content:center}.overflow-hidden[data-v-7d8562ed]{overflow:hidden}.bg-white[data-v-7d8562ed]{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.px-2[data-v-7d8562ed]{padding-left:.5rem;padding-right:.5rem}.text-center[data-v-7d8562ed]{text-align:center}.text-\[80px\][data-v-7d8562ed]{font-size:80px}.text-2xl[data-v-7d8562ed]{font-size:1.5rem;line-height:2rem}.text-\[\#020420\][data-v-7d8562ed]{--un-text-opacity:1;color:rgb(2 4 32/var(--un-text-opacity))}.text-\[\#64748B\][data-v-7d8562ed]{--un-text-opacity:1;color:rgb(100 116 139/var(--un-text-opacity))}.font-semibold[data-v-7d8562ed]{font-weight:600}.leading-none[data-v-7d8562ed]{line-height:1}.tracking-wide[data-v-7d8562ed]{letter-spacing:.025em}.font-sans[data-v-7d8562ed]{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.tabular-nums[data-v-7d8562ed]{--un-numeric-spacing:tabular-nums;font-variant-numeric:var(--un-ordinal) var(--un-slashed-zero) var(--un-numeric-figure) var(--un-numeric-spacing) var(--un-numeric-fraction)}.antialiased[data-v-7d8562ed]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media(prefers-color-scheme:dark){.dark\:bg-\[\#020420\][data-v-7d8562ed]{--un-bg-opacity:1;background-color:rgb(2 4 32/var(--un-bg-opacity))}.dark\:text-white[data-v-7d8562ed]{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media(min-width:640px){.sm\:text-\[110px\][data-v-7d8562ed]{font-size:110px}.sm\:text-3xl[data-v-7d8562ed]{font-size:1.875rem;line-height:2.25rem}}
|
package/dist/client/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__sitemap__/devtools/_nuxt/entry.Ci1pP-eR.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__sitemap__/devtools/_nuxt/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__sitemap__/devtools/_nuxt/entry.Ci1pP-eR.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__sitemap__/devtools/_nuxt/FE81ed4p.js"><script type="module" src="/__sitemap__/devtools/_nuxt/FE81ed4p.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT_SITE_CONFIG__={_priority:{name:-10,env:-15},env:"production",name:"@nuxtjs\u002Fsitemap-client"}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1765851599135,false]</script><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__sitemap__/devtools",buildId:"698c1660-7b4c-4db3-a9a5-6c0e6240b3a7",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
|
package/dist/client/sitemap.xml
CHANGED
package/dist/content.d.mts
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import * as zod from 'zod';
|
|
2
|
-
import { TypeOf } from 'zod';
|
|
3
1
|
import { Collection } from '@nuxt/content';
|
|
2
|
+
import { z, TypeOf } from 'zod';
|
|
4
3
|
|
|
5
|
-
declare const schema:
|
|
6
|
-
sitemap:
|
|
7
|
-
loc:
|
|
8
|
-
lastmod:
|
|
9
|
-
changefreq:
|
|
10
|
-
priority:
|
|
11
|
-
images:
|
|
12
|
-
loc:
|
|
13
|
-
caption:
|
|
14
|
-
geo_location:
|
|
15
|
-
title:
|
|
16
|
-
license:
|
|
17
|
-
}, "strip",
|
|
4
|
+
declare const schema: z.ZodObject<{
|
|
5
|
+
sitemap: z.ZodOptional<z.ZodObject<{
|
|
6
|
+
loc: z.ZodOptional<z.ZodString>;
|
|
7
|
+
lastmod: z.ZodOptional<z.ZodDate>;
|
|
8
|
+
changefreq: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"always">, z.ZodLiteral<"hourly">, z.ZodLiteral<"daily">, z.ZodLiteral<"weekly">, z.ZodLiteral<"monthly">, z.ZodLiteral<"yearly">, z.ZodLiteral<"never">]>>;
|
|
9
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
10
|
+
images: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
11
|
+
loc: z.ZodString;
|
|
12
|
+
caption: z.ZodOptional<z.ZodString>;
|
|
13
|
+
geo_location: z.ZodOptional<z.ZodString>;
|
|
14
|
+
title: z.ZodOptional<z.ZodString>;
|
|
15
|
+
license: z.ZodOptional<z.ZodString>;
|
|
16
|
+
}, "strip", z.ZodTypeAny, {
|
|
18
17
|
loc: string;
|
|
19
18
|
caption?: string | undefined;
|
|
20
19
|
geo_location?: string | undefined;
|
|
@@ -27,32 +26,32 @@ declare const schema: zod.ZodObject<{
|
|
|
27
26
|
title?: string | undefined;
|
|
28
27
|
license?: string | undefined;
|
|
29
28
|
}>, "many">>;
|
|
30
|
-
videos:
|
|
31
|
-
content_loc:
|
|
32
|
-
player_loc:
|
|
33
|
-
duration:
|
|
34
|
-
expiration_date:
|
|
35
|
-
rating:
|
|
36
|
-
view_count:
|
|
37
|
-
publication_date:
|
|
38
|
-
family_friendly:
|
|
39
|
-
tag:
|
|
40
|
-
category:
|
|
41
|
-
restriction:
|
|
42
|
-
relationship:
|
|
43
|
-
value:
|
|
44
|
-
}, "strip",
|
|
29
|
+
videos: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
30
|
+
content_loc: z.ZodString;
|
|
31
|
+
player_loc: z.ZodOptional<z.ZodString>;
|
|
32
|
+
duration: z.ZodOptional<z.ZodString>;
|
|
33
|
+
expiration_date: z.ZodOptional<z.ZodDate>;
|
|
34
|
+
rating: z.ZodOptional<z.ZodNumber>;
|
|
35
|
+
view_count: z.ZodOptional<z.ZodNumber>;
|
|
36
|
+
publication_date: z.ZodOptional<z.ZodDate>;
|
|
37
|
+
family_friendly: z.ZodOptional<z.ZodBoolean>;
|
|
38
|
+
tag: z.ZodOptional<z.ZodString>;
|
|
39
|
+
category: z.ZodOptional<z.ZodString>;
|
|
40
|
+
restriction: z.ZodOptional<z.ZodObject<{
|
|
41
|
+
relationship: z.ZodOptional<z.ZodLiteral<"allow">>;
|
|
42
|
+
value: z.ZodOptional<z.ZodString>;
|
|
43
|
+
}, "strip", z.ZodTypeAny, {
|
|
45
44
|
value?: string | undefined;
|
|
46
45
|
relationship?: "allow" | undefined;
|
|
47
46
|
}, {
|
|
48
47
|
value?: string | undefined;
|
|
49
48
|
relationship?: "allow" | undefined;
|
|
50
49
|
}>>;
|
|
51
|
-
gallery_loc:
|
|
52
|
-
price:
|
|
53
|
-
requires_subscription:
|
|
54
|
-
uploader:
|
|
55
|
-
}, "strip",
|
|
50
|
+
gallery_loc: z.ZodOptional<z.ZodString>;
|
|
51
|
+
price: z.ZodOptional<z.ZodString>;
|
|
52
|
+
requires_subscription: z.ZodOptional<z.ZodBoolean>;
|
|
53
|
+
uploader: z.ZodOptional<z.ZodString>;
|
|
54
|
+
}, "strip", z.ZodTypeAny, {
|
|
56
55
|
content_loc: string;
|
|
57
56
|
player_loc?: string | undefined;
|
|
58
57
|
duration?: string | undefined;
|
|
@@ -91,7 +90,7 @@ declare const schema: zod.ZodObject<{
|
|
|
91
90
|
requires_subscription?: boolean | undefined;
|
|
92
91
|
uploader?: string | undefined;
|
|
93
92
|
}>, "many">>;
|
|
94
|
-
}, "strip",
|
|
93
|
+
}, "strip", z.ZodTypeAny, {
|
|
95
94
|
loc?: string | undefined;
|
|
96
95
|
lastmod?: Date | undefined;
|
|
97
96
|
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
@@ -156,7 +155,7 @@ declare const schema: zod.ZodObject<{
|
|
|
156
155
|
uploader?: string | undefined;
|
|
157
156
|
}[] | undefined;
|
|
158
157
|
}>>;
|
|
159
|
-
}, "strip",
|
|
158
|
+
}, "strip", z.ZodTypeAny, {
|
|
160
159
|
sitemap?: {
|
|
161
160
|
loc?: string | undefined;
|
|
162
161
|
lastmod?: Date | undefined;
|
package/dist/content.d.ts
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import * as zod from 'zod';
|
|
2
|
-
import { TypeOf } from 'zod';
|
|
3
1
|
import { Collection } from '@nuxt/content';
|
|
2
|
+
import { z, TypeOf } from 'zod';
|
|
4
3
|
|
|
5
|
-
declare const schema:
|
|
6
|
-
sitemap:
|
|
7
|
-
loc:
|
|
8
|
-
lastmod:
|
|
9
|
-
changefreq:
|
|
10
|
-
priority:
|
|
11
|
-
images:
|
|
12
|
-
loc:
|
|
13
|
-
caption:
|
|
14
|
-
geo_location:
|
|
15
|
-
title:
|
|
16
|
-
license:
|
|
17
|
-
}, "strip",
|
|
4
|
+
declare const schema: z.ZodObject<{
|
|
5
|
+
sitemap: z.ZodOptional<z.ZodObject<{
|
|
6
|
+
loc: z.ZodOptional<z.ZodString>;
|
|
7
|
+
lastmod: z.ZodOptional<z.ZodDate>;
|
|
8
|
+
changefreq: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"always">, z.ZodLiteral<"hourly">, z.ZodLiteral<"daily">, z.ZodLiteral<"weekly">, z.ZodLiteral<"monthly">, z.ZodLiteral<"yearly">, z.ZodLiteral<"never">]>>;
|
|
9
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
10
|
+
images: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
11
|
+
loc: z.ZodString;
|
|
12
|
+
caption: z.ZodOptional<z.ZodString>;
|
|
13
|
+
geo_location: z.ZodOptional<z.ZodString>;
|
|
14
|
+
title: z.ZodOptional<z.ZodString>;
|
|
15
|
+
license: z.ZodOptional<z.ZodString>;
|
|
16
|
+
}, "strip", z.ZodTypeAny, {
|
|
18
17
|
loc: string;
|
|
19
18
|
caption?: string | undefined;
|
|
20
19
|
geo_location?: string | undefined;
|
|
@@ -27,32 +26,32 @@ declare const schema: zod.ZodObject<{
|
|
|
27
26
|
title?: string | undefined;
|
|
28
27
|
license?: string | undefined;
|
|
29
28
|
}>, "many">>;
|
|
30
|
-
videos:
|
|
31
|
-
content_loc:
|
|
32
|
-
player_loc:
|
|
33
|
-
duration:
|
|
34
|
-
expiration_date:
|
|
35
|
-
rating:
|
|
36
|
-
view_count:
|
|
37
|
-
publication_date:
|
|
38
|
-
family_friendly:
|
|
39
|
-
tag:
|
|
40
|
-
category:
|
|
41
|
-
restriction:
|
|
42
|
-
relationship:
|
|
43
|
-
value:
|
|
44
|
-
}, "strip",
|
|
29
|
+
videos: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
30
|
+
content_loc: z.ZodString;
|
|
31
|
+
player_loc: z.ZodOptional<z.ZodString>;
|
|
32
|
+
duration: z.ZodOptional<z.ZodString>;
|
|
33
|
+
expiration_date: z.ZodOptional<z.ZodDate>;
|
|
34
|
+
rating: z.ZodOptional<z.ZodNumber>;
|
|
35
|
+
view_count: z.ZodOptional<z.ZodNumber>;
|
|
36
|
+
publication_date: z.ZodOptional<z.ZodDate>;
|
|
37
|
+
family_friendly: z.ZodOptional<z.ZodBoolean>;
|
|
38
|
+
tag: z.ZodOptional<z.ZodString>;
|
|
39
|
+
category: z.ZodOptional<z.ZodString>;
|
|
40
|
+
restriction: z.ZodOptional<z.ZodObject<{
|
|
41
|
+
relationship: z.ZodOptional<z.ZodLiteral<"allow">>;
|
|
42
|
+
value: z.ZodOptional<z.ZodString>;
|
|
43
|
+
}, "strip", z.ZodTypeAny, {
|
|
45
44
|
value?: string | undefined;
|
|
46
45
|
relationship?: "allow" | undefined;
|
|
47
46
|
}, {
|
|
48
47
|
value?: string | undefined;
|
|
49
48
|
relationship?: "allow" | undefined;
|
|
50
49
|
}>>;
|
|
51
|
-
gallery_loc:
|
|
52
|
-
price:
|
|
53
|
-
requires_subscription:
|
|
54
|
-
uploader:
|
|
55
|
-
}, "strip",
|
|
50
|
+
gallery_loc: z.ZodOptional<z.ZodString>;
|
|
51
|
+
price: z.ZodOptional<z.ZodString>;
|
|
52
|
+
requires_subscription: z.ZodOptional<z.ZodBoolean>;
|
|
53
|
+
uploader: z.ZodOptional<z.ZodString>;
|
|
54
|
+
}, "strip", z.ZodTypeAny, {
|
|
56
55
|
content_loc: string;
|
|
57
56
|
player_loc?: string | undefined;
|
|
58
57
|
duration?: string | undefined;
|
|
@@ -91,7 +90,7 @@ declare const schema: zod.ZodObject<{
|
|
|
91
90
|
requires_subscription?: boolean | undefined;
|
|
92
91
|
uploader?: string | undefined;
|
|
93
92
|
}>, "many">>;
|
|
94
|
-
}, "strip",
|
|
93
|
+
}, "strip", z.ZodTypeAny, {
|
|
95
94
|
loc?: string | undefined;
|
|
96
95
|
lastmod?: Date | undefined;
|
|
97
96
|
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
@@ -156,7 +155,7 @@ declare const schema: zod.ZodObject<{
|
|
|
156
155
|
uploader?: string | undefined;
|
|
157
156
|
}[] | undefined;
|
|
158
157
|
}>>;
|
|
159
|
-
}, "strip",
|
|
158
|
+
}, "strip", z.ZodTypeAny, {
|
|
160
159
|
sitemap?: {
|
|
161
160
|
loc?: string | undefined;
|
|
162
161
|
lastmod?: Date | undefined;
|
package/dist/content.mjs
CHANGED
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -46,7 +46,7 @@ function deepForEachPage(pages, callback, opts, fullpath = null, depth = 0) {
|
|
|
46
46
|
if (opts.isI18nMicro) {
|
|
47
47
|
const localePattern = /\/:locale\(([^)]+)\)/;
|
|
48
48
|
const match = localePattern.exec(currentPath || "");
|
|
49
|
-
if (match) {
|
|
49
|
+
if (match && match[1]) {
|
|
50
50
|
const locales = match[1].split("|");
|
|
51
51
|
locales.forEach((locale) => {
|
|
52
52
|
const subPage = { ...page };
|
|
@@ -99,12 +99,9 @@ function convertNuxtPagesToSitemapEntries(pages, config) {
|
|
|
99
99
|
}
|
|
100
100
|
const pagesWithMeta = flattenedPages.map((p) => {
|
|
101
101
|
if (config.autoLastmod && p.page.file) {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
p.lastmod = stats.mtime;
|
|
106
|
-
} catch {
|
|
107
|
-
}
|
|
102
|
+
const stats = statSync(p.page.file, { throwIfNoEntry: false });
|
|
103
|
+
if (stats?.mtime)
|
|
104
|
+
p.lastmod = stats.mtime;
|
|
108
105
|
}
|
|
109
106
|
if (p.page?.meta?.sitemap) {
|
|
110
107
|
p = defu(p.page.meta.sitemap, p);
|
|
@@ -115,6 +112,8 @@ function convertNuxtPagesToSitemapEntries(pages, config) {
|
|
|
115
112
|
pagesWithMeta.reduce((acc, e) => {
|
|
116
113
|
if (e.page.name?.includes(routesNameSeparator)) {
|
|
117
114
|
const [name, locale] = e.page.name.split(routesNameSeparator);
|
|
115
|
+
if (!name)
|
|
116
|
+
return acc;
|
|
118
117
|
if (!acc[name])
|
|
119
118
|
acc[name] = [];
|
|
120
119
|
const { _sitemap } = config.normalisedLocales.find((l) => l.code === locale) || { _sitemap: locale };
|
|
@@ -129,6 +128,8 @@ function convertNuxtPagesToSitemapEntries(pages, config) {
|
|
|
129
128
|
if (locale === "default") {
|
|
130
129
|
return entries.map((e) => {
|
|
131
130
|
const [name] = (e.page?.name || "").split(routesNameSeparator);
|
|
131
|
+
if (!name)
|
|
132
|
+
return false;
|
|
132
133
|
if (localeGroups[name]?.some((a) => a.locale === config.defaultLocale))
|
|
133
134
|
return false;
|
|
134
135
|
const defaultLocale = config.normalisedLocales.find((l) => l.code === config.defaultLocale);
|
|
@@ -174,11 +175,11 @@ function convertNuxtPagesToSitemapEntries(pages, config) {
|
|
|
174
175
|
}).filter(Boolean).flat();
|
|
175
176
|
}
|
|
176
177
|
function generateExtraRoutesFromNuxtConfig(nuxt = useNuxt()) {
|
|
177
|
-
const filterForValidPage = (p) => p && !extname(p) && !p.startsWith("/api/") && !p.startsWith("/_");
|
|
178
|
+
const filterForValidPage = (p) => typeof p === "string" && !!p && !extname(p) && !p.startsWith("/api/") && !p.startsWith("/_");
|
|
178
179
|
const routeRules = Object.entries(nuxt.options.routeRules || {}).filter(([k, v]) => {
|
|
179
180
|
if (k.includes("*") || k.includes(".") || k.includes(":"))
|
|
180
181
|
return false;
|
|
181
|
-
if (typeof v.robots === "boolean" && !v.robots)
|
|
182
|
+
if ("robots" in v && typeof v.robots === "boolean" && !v.robots)
|
|
182
183
|
return false;
|
|
183
184
|
return !v.redirect;
|
|
184
185
|
}).map(([k]) => k).filter(filterForValidPage);
|
|
@@ -300,7 +301,7 @@ export async function readSourcesFromFilesystem(filename) {
|
|
|
300
301
|
if (!import.meta.prerender) {
|
|
301
302
|
return null
|
|
302
303
|
}
|
|
303
|
-
const path = join(
|
|
304
|
+
const path = join(${JSON.stringify(runtimeAssetsPath)}, filename)
|
|
304
305
|
const data = await readFile(path, 'utf-8').catch(() => null)
|
|
305
306
|
return data ? JSON.parse(data) : null
|
|
306
307
|
}
|
|
@@ -359,8 +360,9 @@ async function prerenderRoute(nitro, route) {
|
|
|
359
360
|
const start = Date.now();
|
|
360
361
|
const _route = { route, fileName: route };
|
|
361
362
|
const encodedRoute = encodeURI(route);
|
|
363
|
+
const fetchUrl = withBase(encodedRoute, nitro.options.baseURL);
|
|
362
364
|
const res = await globalThis.$fetch.raw(
|
|
363
|
-
|
|
365
|
+
fetchUrl,
|
|
364
366
|
{
|
|
365
367
|
headers: { "x-nitro-prerender": encodedRoute },
|
|
366
368
|
retry: nitro.options.prerender.retry,
|
|
@@ -374,6 +376,8 @@ async function prerenderRoute(nitro, route) {
|
|
|
374
376
|
const filePath = join(nitro.options.output.publicDir, _route.fileName);
|
|
375
377
|
await mkdir(dirname(filePath), { recursive: true });
|
|
376
378
|
const data = res._data;
|
|
379
|
+
if (data === void 0)
|
|
380
|
+
throw new Error(`No data returned from '${fetchUrl}'`);
|
|
377
381
|
if (filePath.endsWith("json") || typeof data === "object")
|
|
378
382
|
await writeFile(filePath, JSON.stringify(data), "utf8");
|
|
379
383
|
else
|
|
@@ -400,14 +404,20 @@ function setupDevToolsUI(options, resolve, nuxt = useNuxt()) {
|
|
|
400
404
|
});
|
|
401
405
|
} else {
|
|
402
406
|
nuxt.hook("vite:extendConfig", (config) => {
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
407
|
+
Object.assign(config, {
|
|
408
|
+
server: {
|
|
409
|
+
...config.server,
|
|
410
|
+
proxy: {
|
|
411
|
+
...config.server?.proxy,
|
|
412
|
+
[DEVTOOLS_UI_ROUTE]: {
|
|
413
|
+
target: `http://localhost:${DEVTOOLS_UI_LOCAL_PORT}${DEVTOOLS_UI_ROUTE}`,
|
|
414
|
+
changeOrigin: true,
|
|
415
|
+
followRedirects: true,
|
|
416
|
+
rewrite: (path) => path.replace(DEVTOOLS_UI_ROUTE, "")
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
});
|
|
411
421
|
});
|
|
412
422
|
}
|
|
413
423
|
nuxt.hook("devtools:customTabs", (tabs) => {
|
|
@@ -456,20 +466,20 @@ function generatePathForI18nPages(ctx) {
|
|
|
456
466
|
return locale?.domain ? withHttps(withBase(path, locale.domain)) : path;
|
|
457
467
|
}
|
|
458
468
|
function normalizeLocales(nuxtI18nConfig) {
|
|
459
|
-
|
|
469
|
+
const rawLocales = nuxtI18nConfig.locales || [];
|
|
460
470
|
let onlyLocales = nuxtI18nConfig?.bundle?.onlyLocales || [];
|
|
461
471
|
onlyLocales = typeof onlyLocales === "string" ? [onlyLocales] : onlyLocales;
|
|
462
|
-
locales = mergeOnKey(
|
|
472
|
+
let locales = mergeOnKey(rawLocales.map((locale) => typeof locale === "string" ? { code: locale } : locale), "code");
|
|
463
473
|
if (onlyLocales.length) {
|
|
464
474
|
locales = locales.filter((locale) => onlyLocales.includes(locale.code));
|
|
465
475
|
}
|
|
466
476
|
return locales.map((locale) => {
|
|
467
|
-
if (locale.iso && !locale.language) {
|
|
477
|
+
if (typeof locale.iso === "string" && !locale.language) {
|
|
468
478
|
locale.language = locale.iso;
|
|
469
479
|
}
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
return locale;
|
|
480
|
+
const _hreflang = locale.language || locale.code;
|
|
481
|
+
const _sitemap = locale.language || locale.code;
|
|
482
|
+
return { ...locale, _hreflang, _sitemap };
|
|
473
483
|
});
|
|
474
484
|
}
|
|
475
485
|
|
|
@@ -492,7 +502,7 @@ function normalizeFilters(filters) {
|
|
|
492
502
|
}).filter(Boolean);
|
|
493
503
|
}
|
|
494
504
|
|
|
495
|
-
const module = defineNuxtModule({
|
|
505
|
+
const module$1 = defineNuxtModule({
|
|
496
506
|
meta: {
|
|
497
507
|
name: "@nuxtjs/sitemap",
|
|
498
508
|
compatibility: {
|
|
@@ -838,7 +848,7 @@ export {}
|
|
|
838
848
|
const images = [];
|
|
839
849
|
if (config.discoverImages) {
|
|
840
850
|
images.push(
|
|
841
|
-
...content.body
|
|
851
|
+
...content.body?.value?.filter(
|
|
842
852
|
(c) => ["image", "img", "nuxtimg", "nuxt-img"].includes(c[0])
|
|
843
853
|
).filter((c) => c[1]?.src).map((c) => ({ loc: c[1].src })) || []
|
|
844
854
|
);
|
|
@@ -1267,4 +1277,4 @@ export async function readSourcesFromFilesystem() {
|
|
|
1267
1277
|
}
|
|
1268
1278
|
});
|
|
1269
1279
|
|
|
1270
|
-
export { module as default };
|
|
1280
|
+
export { module$1 as default };
|
|
@@ -9,24 +9,23 @@ export default defineNitroPlugin((nitroApp) => {
|
|
|
9
9
|
return;
|
|
10
10
|
let images = [];
|
|
11
11
|
if (discoverImages) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
).map((i) => ({ loc: i.props.src })) || [];
|
|
12
|
+
const children = content.body?.children || [];
|
|
13
|
+
images = children.filter((c) => c.tag && c.props?.src && ["image", "img", "nuxtimg", "nuxt-img"].includes(c.tag.toLowerCase())).map((i) => ({ loc: i.props.src }));
|
|
15
14
|
}
|
|
16
15
|
const sitemapConfig = typeof content.sitemap === "object" ? content.sitemap : {};
|
|
17
16
|
const lastmod = content.modifiedAt || content.updatedAt;
|
|
18
17
|
const defaults = {};
|
|
19
|
-
if (isNuxtContentDocumentDriven)
|
|
18
|
+
if (isNuxtContentDocumentDriven && typeof content._path === "string")
|
|
20
19
|
defaults.loc = content._path;
|
|
21
|
-
if (content.path)
|
|
20
|
+
if (typeof content.path === "string")
|
|
22
21
|
defaults.loc = content.path;
|
|
23
22
|
if (images?.length)
|
|
24
23
|
defaults.images = images;
|
|
25
|
-
if (lastmod)
|
|
24
|
+
if (typeof lastmod === "string" || lastmod instanceof Date)
|
|
26
25
|
defaults.lastmod = lastmod;
|
|
27
26
|
const definition = defu(sitemapConfig, defaults);
|
|
28
27
|
if (!definition.loc) {
|
|
29
|
-
if (content.path
|
|
28
|
+
if (typeof content.path === "string" && content.path.startsWith("/"))
|
|
30
29
|
definition.loc = content.path;
|
|
31
30
|
if (Object.keys(sitemapConfig).length > 0 && import.meta.dev)
|
|
32
31
|
console.warn(`[@nuxtjs/content] The @nuxt/content file \`${content._path}\` is missing a sitemap \`loc\`.`);
|
|
@@ -16,9 +16,10 @@ export default defineEventHandler(async (e) => {
|
|
|
16
16
|
const nitroOrigin = getNitroOrigin(e);
|
|
17
17
|
const sitemaps = {};
|
|
18
18
|
for (const s of Object.keys(_sitemaps)) {
|
|
19
|
+
const sitemap = _sitemaps[s];
|
|
19
20
|
sitemaps[s] = {
|
|
20
|
-
...
|
|
21
|
-
sources: await resolveSitemapSources(await childSitemapSources(
|
|
21
|
+
...sitemap,
|
|
22
|
+
sources: await resolveSitemapSources(await childSitemapSources(sitemap), e)
|
|
22
23
|
};
|
|
23
24
|
}
|
|
24
25
|
return {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<
|
|
1
|
+
declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<unknown[]>>;
|
|
2
2
|
export default _default;
|
|
@@ -11,14 +11,15 @@ export default defineEventHandler(async (e) => {
|
|
|
11
11
|
const contentList = [];
|
|
12
12
|
for (const collection of collections) {
|
|
13
13
|
contentList.push(
|
|
14
|
+
// @ts-expect-error dynamic collection name
|
|
14
15
|
queryCollection(e, collection).select("path", "sitemap").where("path", "IS NOT NULL").where("sitemap", "IS NOT NULL").all()
|
|
15
16
|
);
|
|
16
17
|
}
|
|
17
18
|
const results = await Promise.all(contentList);
|
|
18
|
-
return results.flatMap(
|
|
19
|
-
|
|
20
|
-
loc:
|
|
21
|
-
...
|
|
22
|
-
}))
|
|
23
|
-
|
|
19
|
+
return results.flatMap(
|
|
20
|
+
(entries) => entries.filter((c) => c.sitemap !== false && c.path).map((c) => ({
|
|
21
|
+
loc: c.path,
|
|
22
|
+
...typeof c.sitemap === "object" ? c.sitemap : {}
|
|
23
|
+
}))
|
|
24
|
+
).filter(Boolean);
|
|
24
25
|
});
|
|
@@ -45,6 +45,6 @@ export default defineEventHandler(async (e) => {
|
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
const sitemapConfig = getSitemapConfig(sitemapName, sitemaps, runtimeConfig.defaultSitemapsChunkSize);
|
|
48
|
+
const sitemapConfig = getSitemapConfig(sitemapName, sitemaps, runtimeConfig.defaultSitemapsChunkSize || void 0);
|
|
49
49
|
return createSitemap(e, sitemapConfig, runtimeConfig);
|
|
50
50
|
});
|