@nuxtjs/sitemap 5.3.5 → 6.0.0-beta.2

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.
Files changed (115) hide show
  1. package/dist/client/200.html +61 -54
  2. package/dist/client/404.html +61 -54
  3. package/dist/client/_nuxt/{D7WeZTai.js → -0RnDExV.js} +1 -1
  4. package/dist/client/_nuxt/{DOtRmeXT.js → -4dSXLqG.js} +1 -1
  5. package/dist/client/_nuxt/458cWEat.js +3 -0
  6. package/dist/client/_nuxt/{CFF2d1j6.js → BEZjiGez.js} +1 -1
  7. package/dist/client/_nuxt/{B3g-KkBK.js → BHqu4VKd.js} +1 -1
  8. package/dist/client/_nuxt/{D33OKbkv.js → BM5XuWfj.js} +1 -1
  9. package/dist/client/_nuxt/BMRpS3Xo.js +1 -0
  10. package/dist/client/_nuxt/{1rqFXsGc.js → BUinYsBq.js} +2 -2
  11. package/dist/client/_nuxt/BXP-NDAE.js +1 -0
  12. package/dist/client/_nuxt/{kuh6G-Sk.js → BZ035FK2.js} +1 -1
  13. package/dist/client/_nuxt/{DrnZp123.js → B_kA2_jD.js} +1 -1
  14. package/dist/client/_nuxt/BgSQePf4.js +1 -0
  15. package/dist/client/_nuxt/{CdedUr_-.js → BiVAY1KT.js} +1 -1
  16. package/dist/client/_nuxt/BpDWT_aG.js +1 -0
  17. package/dist/client/_nuxt/BpJyBuO9.js +1 -0
  18. package/dist/client/_nuxt/{BnyYJeap.js → Bpum8voz.js} +1 -1
  19. package/dist/client/_nuxt/Br9pa-sp.js +1 -0
  20. package/dist/client/_nuxt/BspO9hSn.js +1 -0
  21. package/dist/client/_nuxt/{DAP_O-zg.js → Bx64mzUw.js} +1 -1
  22. package/dist/client/_nuxt/Bym0hRiG.js +1 -0
  23. package/dist/client/_nuxt/C8DXlOXe.js +1 -0
  24. package/dist/client/_nuxt/{ECt0lbkd.js → CBks_G0r.js} +1 -1
  25. package/dist/client/_nuxt/COBxEbHI.js +1 -0
  26. package/dist/client/_nuxt/CPw9RxLe.js +1 -0
  27. package/dist/client/_nuxt/{dIHJ9UdL.js → CRYtL1Hd.js} +1 -1
  28. package/dist/client/_nuxt/CX3ZWouj.js +229 -0
  29. package/dist/client/_nuxt/{0ooBkv16.js → CaGCoJJM.js} +1 -1
  30. package/dist/client/_nuxt/Ctb_e1-I.js +1 -0
  31. package/dist/client/_nuxt/{AGFfX61t.js → CuOLCh11.js} +1 -1
  32. package/dist/client/_nuxt/{JgH_6NEN.js → CxBHuulF.js} +1 -1
  33. package/dist/client/_nuxt/{CJIaz0BQ.js → CxLlwT--.js} +1 -1
  34. package/dist/client/_nuxt/{B6bHXiXE.js → D3VHKxjW.js} +1 -1
  35. package/dist/client/_nuxt/D46m5Xd3.js +1 -0
  36. package/dist/client/_nuxt/D5OoM2Ul.js +1 -0
  37. package/dist/client/_nuxt/D5lQfeOG.js +1 -0
  38. package/dist/client/_nuxt/D8V69RRQ.js +1 -0
  39. package/dist/client/_nuxt/{CX_FIdg1.js → DDK5Hw8n.js} +1 -1
  40. package/dist/client/_nuxt/{C1yTBzia.js → DIyf2Ztx.js} +1 -1
  41. package/dist/client/_nuxt/{BZfs-ost.js → DOv5BRyJ.js} +1 -1
  42. package/dist/client/_nuxt/DQ-rpzxz.js +1 -0
  43. package/dist/client/_nuxt/DUsrs60I.js +6 -0
  44. package/dist/client/_nuxt/DV9_Ze0W.js +1 -0
  45. package/dist/client/_nuxt/{Bxkoe-BC.js → EQHFthT6.js} +1 -1
  46. package/dist/client/_nuxt/Ev-gWqHG.js +1 -0
  47. package/dist/client/_nuxt/{BacI6-DX.js → FRbOFgZn.js} +1 -1
  48. package/dist/client/_nuxt/{CqYeW6XZ.js → Gme1ZbSQ.js} +1 -1
  49. package/dist/client/_nuxt/{Br6ll-O0.js → NrGJGX17.js} +1 -1
  50. package/dist/client/_nuxt/{CarfVElc.js → ULUzDaxg.js} +1 -1
  51. package/dist/client/_nuxt/USEQoosB.js +31 -0
  52. package/dist/client/_nuxt/{DGDuLtS6.js → V16qqttt.js} +1 -1
  53. package/dist/client/_nuxt/builds/latest.json +1 -1
  54. package/dist/client/_nuxt/builds/meta/99e0fea3-c4e8-45fe-88b0-f49b86d00f5b.json +1 -0
  55. package/dist/client/_nuxt/d42HzezM.js +1 -0
  56. package/dist/client/_nuxt/entry.BnSVD-Km.css +1 -0
  57. package/dist/client/_nuxt/error-404.BOXiSWAJ.css +1 -0
  58. package/dist/client/_nuxt/error-500.DmKlUOlN.css +1 -0
  59. package/dist/client/_nuxt/{BXR915QZ.js → ewRyznZJ.js} +1 -1
  60. package/dist/client/_nuxt/{BVLuctcA.js → vMuZBeRS.js} +1 -1
  61. package/dist/client/_nuxt/{Bj5xdiaE.js → xuIuMB9j.js} +1 -1
  62. package/dist/client/_nuxt/{ChMCFiS0.js → zIdFMUa4.js} +1 -1
  63. package/dist/client/_nuxt/{BVkeqZ59.js → zbShYgi7.js} +1 -1
  64. package/dist/client/index.html +61 -54
  65. package/dist/module.d.mts +355 -1
  66. package/dist/module.d.ts +355 -1
  67. package/dist/module.json +2 -2
  68. package/dist/module.mjs +178 -32
  69. package/dist/runtime/nitro/composables/getPathRobotConfigPolyfill.d.ts +2 -1
  70. package/dist/runtime/nitro/composables/getPathRobotConfigPolyfill.js +1 -1
  71. package/dist/runtime/nitro/routes/__sitemap__/debug.d.ts +8 -6
  72. package/dist/runtime/nitro/{middleware/[sitemap]-sitemap.xml.d.ts → routes/sitemap/[sitemap].xml.d.ts} +1 -1
  73. package/dist/runtime/nitro/routes/sitemap/[sitemap].xml.js +20 -0
  74. package/dist/runtime/nitro/routes/sitemap.xsl.js +2 -1
  75. package/dist/runtime/nitro/routes/sitemap_index.xml.js +19 -16
  76. package/dist/runtime/nitro/sitemap/builder/sitemap-index.d.ts +3 -2
  77. package/dist/runtime/nitro/sitemap/builder/sitemap-index.js +14 -28
  78. package/dist/runtime/nitro/sitemap/builder/sitemap.d.ts +9 -2
  79. package/dist/runtime/nitro/sitemap/builder/sitemap.js +154 -54
  80. package/dist/runtime/nitro/sitemap/builder/xml.d.ts +1 -1
  81. package/dist/runtime/nitro/sitemap/builder/xml.js +2 -0
  82. package/dist/runtime/nitro/sitemap/nitro.d.ts +1 -1
  83. package/dist/runtime/nitro/sitemap/nitro.js +47 -11
  84. package/dist/runtime/nitro/sitemap/urlset/normalise.d.ts +3 -2
  85. package/dist/runtime/nitro/sitemap/urlset/normalise.js +64 -53
  86. package/dist/runtime/types.d.ts +35 -4
  87. package/dist/runtime/utils-pure.d.ts +2 -1
  88. package/dist/runtime/utils-pure.js +6 -0
  89. package/package.json +24 -25
  90. package/dist/client/_nuxt/3ghuYFLd.js +0 -1
  91. package/dist/client/_nuxt/9B1nZgL-.js +0 -1
  92. package/dist/client/_nuxt/BG-qYwi8.js +0 -6
  93. package/dist/client/_nuxt/BIxS-Weu.js +0 -1
  94. package/dist/client/_nuxt/BYdKNJ10.js +0 -1
  95. package/dist/client/_nuxt/Bi43K_FX.js +0 -6
  96. package/dist/client/_nuxt/CBPJd_fO.js +0 -1
  97. package/dist/client/_nuxt/CCqFro8U.js +0 -3
  98. package/dist/client/_nuxt/CEfge3mM.js +0 -1
  99. package/dist/client/_nuxt/CSPeAESR.js +0 -1
  100. package/dist/client/_nuxt/D0mw_hZ2.js +0 -31
  101. package/dist/client/_nuxt/DGO8GyiP.js +0 -1
  102. package/dist/client/_nuxt/DOHBU7tp.js +0 -1
  103. package/dist/client/_nuxt/DQoqAi02.js +0 -1
  104. package/dist/client/_nuxt/DVLwECkk.js +0 -1
  105. package/dist/client/_nuxt/Du6_OKDb.js +0 -159
  106. package/dist/client/_nuxt/builds/meta/ab2ad6a2-f67d-4194-8e33-d46fbc5d1290.json +0 -1
  107. package/dist/client/_nuxt/eJfcURhx.js +0 -1
  108. package/dist/client/_nuxt/entry.CfxF9LiM.css +0 -1
  109. package/dist/client/_nuxt/error-404.D56ZPmHb.css +0 -1
  110. package/dist/client/_nuxt/error-500.BYEp4uQX.css +0 -1
  111. package/dist/runtime/nitro/middleware/[sitemap]-sitemap.xml.js +0 -23
  112. package/dist/runtime/nitro/sitemap/urlset/filter.d.ts +0 -5
  113. package/dist/runtime/nitro/sitemap/urlset/filter.js +0 -24
  114. package/dist/runtime/nitro/sitemap/urlset/i18n.d.ts +0 -6
  115. package/dist/runtime/nitro/sitemap/urlset/i18n.js +0 -142
package/dist/module.d.mts CHANGED
@@ -1,5 +1,359 @@
1
1
  import * as _nuxt_schema from '@nuxt/schema';
2
- import { ModuleOptions as ModuleOptions$1 } from '../dist/runtime/types.js';
2
+ import { FetchOptions } from 'ofetch';
3
+
4
+ interface ModuleOptions$1 extends SitemapDefinition {
5
+ /**
6
+ * Whether the sitemap.xml should be generated.
7
+ *
8
+ * @default true
9
+ */
10
+ enabled: boolean;
11
+ /**
12
+ * Enables debug logs and a debug endpoint.
13
+ *
14
+ * @default false
15
+ */
16
+ debug: boolean;
17
+ /**
18
+ * Minify the sitemap xml
19
+ *
20
+ * @default false
21
+ */
22
+ minify: boolean;
23
+ /**
24
+ * Should lastmod be automatically added to the sitemap.
25
+ *
26
+ * Warning: This may not be following best practices for sitemaps.
27
+ *
28
+ * @see https://nuxtseo.com/sitemap/guides/best-practices.
29
+ * @default false
30
+ */
31
+ autoLastmod: boolean;
32
+ /**
33
+ * Should pages be automatically added to the sitemap.
34
+ *
35
+ * @default true
36
+ * @deprecated If set to false, use `excludeAppSources: ['pages', 'route-rules', 'prerender']` instead. Otherwise, remove this.
37
+ */
38
+ inferStaticPagesAsRoutes: boolean;
39
+ /**
40
+ * Sources to exclude from the sitemap.
41
+ */
42
+ excludeAppSources: true | (AppSourceContext[]);
43
+ /**
44
+ * Multiple sitemap support for large sites.
45
+ *
46
+ * @default false
47
+ */
48
+ sitemaps?: boolean | MultiSitemapsInput;
49
+ /**
50
+ * The path prefix for the sitemaps.
51
+ *
52
+ * @default /__sitemap__/
53
+ */
54
+ sitemapsPathPrefix: string;
55
+ /**
56
+ * Sitemaps to append to the sitemap index.
57
+ *
58
+ * This will only do anything when using multiple sitemaps.
59
+ */
60
+ appendSitemaps?: (string | SitemapIndexEntry)[];
61
+ /**
62
+ * Path to the xsl that styles sitemap.xml.
63
+ *
64
+ * Set to `false` to disable styling.
65
+ *
66
+ * @default /__sitemap__/style.xsl
67
+ */
68
+ xsl: string | false;
69
+ /**
70
+ * Toggle the tips displayed in the xsl.
71
+ *
72
+ * @default true
73
+ */
74
+ xslTips: boolean;
75
+ /**
76
+ * Customised the columns displayed in the xsl.
77
+ *
78
+ * @default [{ label: 'URL', width: '50%', select: 'string' }, { label: 'Last Modified', width: '25%', select: 'lastmod' }, { label: 'Change Frequency', width: '25%', select: 'changefreq' }]
79
+ */
80
+ xslColumns?: {
81
+ label: string;
82
+ width: `${string}%`;
83
+ select?: string;
84
+ }[];
85
+ /**
86
+ * When prerendering, should images be automatically be discovered and added to the sitemap.
87
+ *
88
+ * @default true
89
+ */
90
+ discoverImages: boolean;
91
+ /**
92
+ * When prerendering, should videos be automatically be discovered and added to the sitemap.
93
+ *
94
+ * @default true
95
+ */
96
+ discoverVideos: boolean;
97
+ /**
98
+ * When chunking the sitemaps into multiple files, how many entries should each file contain.
99
+ *
100
+ * Set to `false` to disabling chunking completely.
101
+ *
102
+ * @default 1000
103
+ */
104
+ defaultSitemapsChunkSize: number | false;
105
+ /**
106
+ * Modify the cache behavior.
107
+ *
108
+ * Passing a boolean will enable or disable the runtime cache with the default options.
109
+ *
110
+ * Providing a record will allow you to configure the runtime cache fully.
111
+ *
112
+ * @default true
113
+ * @see https://nitro.unjs.io/guide/storage#mountpoints
114
+ * @example { driver: 'redis', host: 'localhost', port: 6379, password: 'password' }
115
+ */
116
+ runtimeCacheStorage: boolean | (Record<string, any> & {
117
+ driver: string;
118
+ });
119
+ /**
120
+ * Automatically add alternative links to the sitemap based on a prefix list.
121
+ * Is used by @nuxtjs/i18n to automatically add alternative links to the sitemap.
122
+ */
123
+ autoI18n?: boolean | AutoI18nConfig;
124
+ /**
125
+ * Enable when your nuxt/content files match your pages. This will automatically add sitemap content to the sitemap.
126
+ *
127
+ * This is similar behavior to using `nuxt/content` with `documentDriven: true`.
128
+ */
129
+ strictNuxtContentPaths: boolean;
130
+ /**
131
+ * Should the sitemap.xml display credits for the module.
132
+ *
133
+ * @default true
134
+ */
135
+ credits: boolean;
136
+ /**
137
+ * How long, in milliseconds, should the sitemap be cached for.
138
+ *
139
+ * @default 1 hour
140
+ *
141
+ * @deprecated use cacheMaxAgeSeconds
142
+ */
143
+ cacheTtl?: number | false;
144
+ /**
145
+ * How long, in seconds, should the sitemap be cached for.
146
+ *
147
+ * @default 600
148
+ */
149
+ cacheMaxAgeSeconds: number | false;
150
+ /**
151
+ * Should the entries be sorted by loc.
152
+ *
153
+ * @default true
154
+ */
155
+ sortEntries: boolean;
156
+ /**
157
+ * Warm up the sitemap route(s) cache when Nitro starts.
158
+ *
159
+ * May be implemented by default in a future minor version.
160
+ *
161
+ * @experimental Will be enabled by default in v5 (if stable)
162
+ */
163
+ experimentalWarmUp?: boolean;
164
+ /**
165
+ * Send the Sitemap as a compressed stream supporting gzip, brolti, etc.
166
+ *
167
+ * @experimental Will be enabled by default in v5 (if stable)
168
+ */
169
+ experimentalCompression?: boolean;
170
+ }
171
+ interface IndexSitemapRemotes {
172
+ index?: (string | SitemapIndexEntry)[];
173
+ }
174
+ interface MultiSitemapEntry {
175
+ [key: string]: Partial<SitemapDefinition>;
176
+ }
177
+ type MultiSitemapsInput = Partial<MultiSitemapEntry> & Partial<IndexSitemapRemotes>;
178
+ type MaybeFunction<T> = T | (() => T);
179
+ type MaybePromise<T> = T | Promise<T>;
180
+ type SitemapUrlInput = SitemapUrl | string;
181
+ interface SitemapSourceBase {
182
+ context: {
183
+ name: string;
184
+ description?: string;
185
+ tips?: string[];
186
+ };
187
+ fetch?: string | [string, FetchOptions];
188
+ urls?: SitemapUrlInput[];
189
+ sourceType?: 'app' | 'user';
190
+ }
191
+ interface SitemapSourceResolved extends Omit<SitemapSourceBase, 'urls'> {
192
+ urls: SitemapUrlInput[];
193
+ error?: any;
194
+ timeTakenMs?: number;
195
+ }
196
+ type AppSourceContext = 'nuxt:pages' | 'nuxt:prerender' | 'nuxt:route-rules' | '@nuxtjs/i18n:pages' | '@nuxt/content:document-driven';
197
+ type SitemapSourceInput = string | [string, FetchOptions] | SitemapSourceBase | SitemapSourceResolved;
198
+ interface NormalisedLocale {
199
+ code: string;
200
+ iso?: string;
201
+ domain?: string;
202
+ }
203
+ type NormalisedLocales = NormalisedLocale[];
204
+ interface AutoI18nConfig {
205
+ differentDomains?: boolean;
206
+ locales: NormalisedLocales;
207
+ defaultLocale: string;
208
+ strategy: 'prefix' | 'prefix_except_default' | 'prefix_and_default' | 'no_prefix';
209
+ }
210
+ interface SitemapIndexEntry {
211
+ sitemap: string;
212
+ lastmod?: string;
213
+ /**
214
+ * @internal
215
+ */
216
+ _sitemapName?: string;
217
+ }
218
+ type FilterInput = (string | RegExp | {
219
+ regex: string;
220
+ });
221
+ interface SitemapDefinition {
222
+ /**
223
+ * A collection include patterns for filtering which URLs end up in the sitemap.
224
+ */
225
+ include?: FilterInput[];
226
+ /**
227
+ * A collection exclude patterns for filtering which URLs end up in the sitemap.
228
+ */
229
+ exclude?: FilterInput[];
230
+ /**
231
+ * Should the sitemap be generated using global sources.
232
+ *
233
+ * This is enabled by default when using a single sitemap. Otherwise, it will be opt-in.
234
+ */
235
+ includeAppSources?: boolean;
236
+ /**
237
+ * The root sitemap name.
238
+ * Only works when multiple sitemaps option `sitemaps` isn't used.
239
+ *
240
+ * @default `sitemap.xml`
241
+ */
242
+ sitemapName: string;
243
+ /**
244
+ * A resolvable collection of URLs to include in the sitemap.
245
+ *
246
+ * Will be resolved when the sitemap is generated.
247
+ */
248
+ urls?: MaybeFunction<MaybePromise<SitemapUrlInput[]>>;
249
+ /**
250
+ * Default options for all URLs in the sitemap.
251
+ */
252
+ defaults?: Omit<SitemapUrl, 'loc'>;
253
+ /**
254
+ * Additional sources of URLs to include in the sitemap.
255
+ */
256
+ sources?: SitemapSourceInput[];
257
+ /**
258
+ * The endpoint to fetch dynamic URLs from.
259
+ *
260
+ * @deprecated use `sources`
261
+ */
262
+ dynamicUrlsApiEndpoint?: string | false;
263
+ /**
264
+ * @internal
265
+ */
266
+ _route?: string;
267
+ }
268
+ type Changefreq = 'always' | 'hourly' | 'daily' | 'weekly' | 'monthly' | 'yearly' | 'never';
269
+ interface SitemapUrl {
270
+ loc: string;
271
+ lastmod?: string | Date;
272
+ changefreq?: Changefreq;
273
+ priority?: 0 | 0.1 | 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9 | 1;
274
+ alternatives?: Array<AlternativeEntry>;
275
+ news?: GoogleNewsEntry;
276
+ images?: Array<ImageEntry>;
277
+ videos?: Array<VideoEntry>;
278
+ _i18nTransform?: boolean;
279
+ _sitemap?: string;
280
+ /**
281
+ * @deprecated use `loc`
282
+ */
283
+ url?: string;
284
+ }
285
+ interface AlternativeEntry {
286
+ hreflang: string;
287
+ href: string | URL;
288
+ }
289
+ interface GoogleNewsEntry {
290
+ /**
291
+ * The title of the news article.
292
+ * @example "Companies A, B in Merger Talks"
293
+ */
294
+ title: string;
295
+ /**
296
+ * The article publication date in W3C format. Specify the original date and time when the article was first
297
+ * published on your site. Don't specify the time when you added the article to your sitemap.
298
+ * @example "2008-12-23"
299
+ */
300
+ publication_date: Date | string;
301
+ publication: {
302
+ /**
303
+ * The <news:name> tag is the name of the news publication.
304
+ * It must exactly match the name as it appears on your articles on news.google.com, omitting anything in parentheses.
305
+ * @example "The Example Times"
306
+ */
307
+ name: string;
308
+ /**
309
+ * The <news:language> tag is the language of your publication. Use an ISO 639 language code (two or three letters).
310
+ * @example en
311
+ */
312
+ language: string;
313
+ };
314
+ }
315
+ interface ImageEntry {
316
+ loc: string | URL;
317
+ caption?: string;
318
+ geoLocation?: string;
319
+ title?: string;
320
+ license?: string | URL;
321
+ }
322
+ interface VideoEntry {
323
+ title: string;
324
+ thumbnail_loc: string | URL;
325
+ description: string;
326
+ content_loc?: string | URL;
327
+ player_loc?: string | URL;
328
+ duration?: number;
329
+ expiration_date?: Date | string;
330
+ rating?: number;
331
+ view_count?: number;
332
+ publication_date?: Date | string;
333
+ family_friendly?: 'yes' | 'no' | boolean;
334
+ restriction?: Restriction;
335
+ platform?: Platform;
336
+ price?: ({
337
+ price?: number | string;
338
+ currency?: string;
339
+ type?: 'rent' | 'purchase' | 'package' | 'subscription';
340
+ })[];
341
+ requires_subscription?: 'yes' | 'no' | boolean;
342
+ uploader?: {
343
+ uploader: string;
344
+ info?: string | URL;
345
+ };
346
+ live?: 'yes' | 'no' | boolean;
347
+ tag?: string | string[];
348
+ }
349
+ interface Restriction {
350
+ relationship: 'allow' | 'deny';
351
+ restriction: string;
352
+ }
353
+ interface Platform {
354
+ relationship: 'allow' | 'deny';
355
+ platform: string;
356
+ }
3
357
 
4
358
  interface ModuleOptions extends ModuleOptions$1 {
5
359
  }
package/dist/module.d.ts CHANGED
@@ -1,5 +1,359 @@
1
1
  import * as _nuxt_schema from '@nuxt/schema';
2
- import { ModuleOptions as ModuleOptions$1 } from '../dist/runtime/types.js';
2
+ import { FetchOptions } from 'ofetch';
3
+
4
+ interface ModuleOptions$1 extends SitemapDefinition {
5
+ /**
6
+ * Whether the sitemap.xml should be generated.
7
+ *
8
+ * @default true
9
+ */
10
+ enabled: boolean;
11
+ /**
12
+ * Enables debug logs and a debug endpoint.
13
+ *
14
+ * @default false
15
+ */
16
+ debug: boolean;
17
+ /**
18
+ * Minify the sitemap xml
19
+ *
20
+ * @default false
21
+ */
22
+ minify: boolean;
23
+ /**
24
+ * Should lastmod be automatically added to the sitemap.
25
+ *
26
+ * Warning: This may not be following best practices for sitemaps.
27
+ *
28
+ * @see https://nuxtseo.com/sitemap/guides/best-practices.
29
+ * @default false
30
+ */
31
+ autoLastmod: boolean;
32
+ /**
33
+ * Should pages be automatically added to the sitemap.
34
+ *
35
+ * @default true
36
+ * @deprecated If set to false, use `excludeAppSources: ['pages', 'route-rules', 'prerender']` instead. Otherwise, remove this.
37
+ */
38
+ inferStaticPagesAsRoutes: boolean;
39
+ /**
40
+ * Sources to exclude from the sitemap.
41
+ */
42
+ excludeAppSources: true | (AppSourceContext[]);
43
+ /**
44
+ * Multiple sitemap support for large sites.
45
+ *
46
+ * @default false
47
+ */
48
+ sitemaps?: boolean | MultiSitemapsInput;
49
+ /**
50
+ * The path prefix for the sitemaps.
51
+ *
52
+ * @default /__sitemap__/
53
+ */
54
+ sitemapsPathPrefix: string;
55
+ /**
56
+ * Sitemaps to append to the sitemap index.
57
+ *
58
+ * This will only do anything when using multiple sitemaps.
59
+ */
60
+ appendSitemaps?: (string | SitemapIndexEntry)[];
61
+ /**
62
+ * Path to the xsl that styles sitemap.xml.
63
+ *
64
+ * Set to `false` to disable styling.
65
+ *
66
+ * @default /__sitemap__/style.xsl
67
+ */
68
+ xsl: string | false;
69
+ /**
70
+ * Toggle the tips displayed in the xsl.
71
+ *
72
+ * @default true
73
+ */
74
+ xslTips: boolean;
75
+ /**
76
+ * Customised the columns displayed in the xsl.
77
+ *
78
+ * @default [{ label: 'URL', width: '50%', select: 'string' }, { label: 'Last Modified', width: '25%', select: 'lastmod' }, { label: 'Change Frequency', width: '25%', select: 'changefreq' }]
79
+ */
80
+ xslColumns?: {
81
+ label: string;
82
+ width: `${string}%`;
83
+ select?: string;
84
+ }[];
85
+ /**
86
+ * When prerendering, should images be automatically be discovered and added to the sitemap.
87
+ *
88
+ * @default true
89
+ */
90
+ discoverImages: boolean;
91
+ /**
92
+ * When prerendering, should videos be automatically be discovered and added to the sitemap.
93
+ *
94
+ * @default true
95
+ */
96
+ discoverVideos: boolean;
97
+ /**
98
+ * When chunking the sitemaps into multiple files, how many entries should each file contain.
99
+ *
100
+ * Set to `false` to disabling chunking completely.
101
+ *
102
+ * @default 1000
103
+ */
104
+ defaultSitemapsChunkSize: number | false;
105
+ /**
106
+ * Modify the cache behavior.
107
+ *
108
+ * Passing a boolean will enable or disable the runtime cache with the default options.
109
+ *
110
+ * Providing a record will allow you to configure the runtime cache fully.
111
+ *
112
+ * @default true
113
+ * @see https://nitro.unjs.io/guide/storage#mountpoints
114
+ * @example { driver: 'redis', host: 'localhost', port: 6379, password: 'password' }
115
+ */
116
+ runtimeCacheStorage: boolean | (Record<string, any> & {
117
+ driver: string;
118
+ });
119
+ /**
120
+ * Automatically add alternative links to the sitemap based on a prefix list.
121
+ * Is used by @nuxtjs/i18n to automatically add alternative links to the sitemap.
122
+ */
123
+ autoI18n?: boolean | AutoI18nConfig;
124
+ /**
125
+ * Enable when your nuxt/content files match your pages. This will automatically add sitemap content to the sitemap.
126
+ *
127
+ * This is similar behavior to using `nuxt/content` with `documentDriven: true`.
128
+ */
129
+ strictNuxtContentPaths: boolean;
130
+ /**
131
+ * Should the sitemap.xml display credits for the module.
132
+ *
133
+ * @default true
134
+ */
135
+ credits: boolean;
136
+ /**
137
+ * How long, in milliseconds, should the sitemap be cached for.
138
+ *
139
+ * @default 1 hour
140
+ *
141
+ * @deprecated use cacheMaxAgeSeconds
142
+ */
143
+ cacheTtl?: number | false;
144
+ /**
145
+ * How long, in seconds, should the sitemap be cached for.
146
+ *
147
+ * @default 600
148
+ */
149
+ cacheMaxAgeSeconds: number | false;
150
+ /**
151
+ * Should the entries be sorted by loc.
152
+ *
153
+ * @default true
154
+ */
155
+ sortEntries: boolean;
156
+ /**
157
+ * Warm up the sitemap route(s) cache when Nitro starts.
158
+ *
159
+ * May be implemented by default in a future minor version.
160
+ *
161
+ * @experimental Will be enabled by default in v5 (if stable)
162
+ */
163
+ experimentalWarmUp?: boolean;
164
+ /**
165
+ * Send the Sitemap as a compressed stream supporting gzip, brolti, etc.
166
+ *
167
+ * @experimental Will be enabled by default in v5 (if stable)
168
+ */
169
+ experimentalCompression?: boolean;
170
+ }
171
+ interface IndexSitemapRemotes {
172
+ index?: (string | SitemapIndexEntry)[];
173
+ }
174
+ interface MultiSitemapEntry {
175
+ [key: string]: Partial<SitemapDefinition>;
176
+ }
177
+ type MultiSitemapsInput = Partial<MultiSitemapEntry> & Partial<IndexSitemapRemotes>;
178
+ type MaybeFunction<T> = T | (() => T);
179
+ type MaybePromise<T> = T | Promise<T>;
180
+ type SitemapUrlInput = SitemapUrl | string;
181
+ interface SitemapSourceBase {
182
+ context: {
183
+ name: string;
184
+ description?: string;
185
+ tips?: string[];
186
+ };
187
+ fetch?: string | [string, FetchOptions];
188
+ urls?: SitemapUrlInput[];
189
+ sourceType?: 'app' | 'user';
190
+ }
191
+ interface SitemapSourceResolved extends Omit<SitemapSourceBase, 'urls'> {
192
+ urls: SitemapUrlInput[];
193
+ error?: any;
194
+ timeTakenMs?: number;
195
+ }
196
+ type AppSourceContext = 'nuxt:pages' | 'nuxt:prerender' | 'nuxt:route-rules' | '@nuxtjs/i18n:pages' | '@nuxt/content:document-driven';
197
+ type SitemapSourceInput = string | [string, FetchOptions] | SitemapSourceBase | SitemapSourceResolved;
198
+ interface NormalisedLocale {
199
+ code: string;
200
+ iso?: string;
201
+ domain?: string;
202
+ }
203
+ type NormalisedLocales = NormalisedLocale[];
204
+ interface AutoI18nConfig {
205
+ differentDomains?: boolean;
206
+ locales: NormalisedLocales;
207
+ defaultLocale: string;
208
+ strategy: 'prefix' | 'prefix_except_default' | 'prefix_and_default' | 'no_prefix';
209
+ }
210
+ interface SitemapIndexEntry {
211
+ sitemap: string;
212
+ lastmod?: string;
213
+ /**
214
+ * @internal
215
+ */
216
+ _sitemapName?: string;
217
+ }
218
+ type FilterInput = (string | RegExp | {
219
+ regex: string;
220
+ });
221
+ interface SitemapDefinition {
222
+ /**
223
+ * A collection include patterns for filtering which URLs end up in the sitemap.
224
+ */
225
+ include?: FilterInput[];
226
+ /**
227
+ * A collection exclude patterns for filtering which URLs end up in the sitemap.
228
+ */
229
+ exclude?: FilterInput[];
230
+ /**
231
+ * Should the sitemap be generated using global sources.
232
+ *
233
+ * This is enabled by default when using a single sitemap. Otherwise, it will be opt-in.
234
+ */
235
+ includeAppSources?: boolean;
236
+ /**
237
+ * The root sitemap name.
238
+ * Only works when multiple sitemaps option `sitemaps` isn't used.
239
+ *
240
+ * @default `sitemap.xml`
241
+ */
242
+ sitemapName: string;
243
+ /**
244
+ * A resolvable collection of URLs to include in the sitemap.
245
+ *
246
+ * Will be resolved when the sitemap is generated.
247
+ */
248
+ urls?: MaybeFunction<MaybePromise<SitemapUrlInput[]>>;
249
+ /**
250
+ * Default options for all URLs in the sitemap.
251
+ */
252
+ defaults?: Omit<SitemapUrl, 'loc'>;
253
+ /**
254
+ * Additional sources of URLs to include in the sitemap.
255
+ */
256
+ sources?: SitemapSourceInput[];
257
+ /**
258
+ * The endpoint to fetch dynamic URLs from.
259
+ *
260
+ * @deprecated use `sources`
261
+ */
262
+ dynamicUrlsApiEndpoint?: string | false;
263
+ /**
264
+ * @internal
265
+ */
266
+ _route?: string;
267
+ }
268
+ type Changefreq = 'always' | 'hourly' | 'daily' | 'weekly' | 'monthly' | 'yearly' | 'never';
269
+ interface SitemapUrl {
270
+ loc: string;
271
+ lastmod?: string | Date;
272
+ changefreq?: Changefreq;
273
+ priority?: 0 | 0.1 | 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9 | 1;
274
+ alternatives?: Array<AlternativeEntry>;
275
+ news?: GoogleNewsEntry;
276
+ images?: Array<ImageEntry>;
277
+ videos?: Array<VideoEntry>;
278
+ _i18nTransform?: boolean;
279
+ _sitemap?: string;
280
+ /**
281
+ * @deprecated use `loc`
282
+ */
283
+ url?: string;
284
+ }
285
+ interface AlternativeEntry {
286
+ hreflang: string;
287
+ href: string | URL;
288
+ }
289
+ interface GoogleNewsEntry {
290
+ /**
291
+ * The title of the news article.
292
+ * @example "Companies A, B in Merger Talks"
293
+ */
294
+ title: string;
295
+ /**
296
+ * The article publication date in W3C format. Specify the original date and time when the article was first
297
+ * published on your site. Don't specify the time when you added the article to your sitemap.
298
+ * @example "2008-12-23"
299
+ */
300
+ publication_date: Date | string;
301
+ publication: {
302
+ /**
303
+ * The <news:name> tag is the name of the news publication.
304
+ * It must exactly match the name as it appears on your articles on news.google.com, omitting anything in parentheses.
305
+ * @example "The Example Times"
306
+ */
307
+ name: string;
308
+ /**
309
+ * The <news:language> tag is the language of your publication. Use an ISO 639 language code (two or three letters).
310
+ * @example en
311
+ */
312
+ language: string;
313
+ };
314
+ }
315
+ interface ImageEntry {
316
+ loc: string | URL;
317
+ caption?: string;
318
+ geoLocation?: string;
319
+ title?: string;
320
+ license?: string | URL;
321
+ }
322
+ interface VideoEntry {
323
+ title: string;
324
+ thumbnail_loc: string | URL;
325
+ description: string;
326
+ content_loc?: string | URL;
327
+ player_loc?: string | URL;
328
+ duration?: number;
329
+ expiration_date?: Date | string;
330
+ rating?: number;
331
+ view_count?: number;
332
+ publication_date?: Date | string;
333
+ family_friendly?: 'yes' | 'no' | boolean;
334
+ restriction?: Restriction;
335
+ platform?: Platform;
336
+ price?: ({
337
+ price?: number | string;
338
+ currency?: string;
339
+ type?: 'rent' | 'purchase' | 'package' | 'subscription';
340
+ })[];
341
+ requires_subscription?: 'yes' | 'no' | boolean;
342
+ uploader?: {
343
+ uploader: string;
344
+ info?: string | URL;
345
+ };
346
+ live?: 'yes' | 'no' | boolean;
347
+ tag?: string | string[];
348
+ }
349
+ interface Restriction {
350
+ relationship: 'allow' | 'deny';
351
+ restriction: string;
352
+ }
353
+ interface Platform {
354
+ relationship: 'allow' | 'deny';
355
+ platform: string;
356
+ }
3
357
 
4
358
  interface ModuleOptions extends ModuleOptions$1 {
5
359
  }