The v7 major of Nuxt Sitemap is a simple release to remove deprecations and add support for the Nuxt SEO v2 stable.
Nuxt Site Config is a module used internally by Nuxt Sitemap.
The major update to v3.0.0 shouldn't have any direct effect on your site, however, you may want to double-check the breaking changes.
inferStaticPagesAsRoutes configIf you set this value to false previously, you will need to change it to the below:
export default defineNuxtConfig({
sitemap: {
- inferStaticPagesAsRoutes: false,
+ excludeAppSources: ['pages', 'route-rules', 'prerender']
}
})
dynamicUrlsApiEndpoint configThe sources config supports multiple API endpoints and allows you to provide custom fetch options, use this instead.
export default defineNuxtConfig({
sitemap: {
- dynamicUrlsApiEndpoint: '/__sitemap/urls',
+ sources: ['/__sitemap/urls']
}
})
cacheTtl configPlease use the cacheMaxAgeSeconds as its a clearer config.
export default defineNuxtConfig({
sitemap: {
- cacheTtl: 10000,
+ cacheMaxAgeSeconds: 10000
}
})
index route rule / Nuxt Content supportIf you were using the index: false in either route rules or your Nuxt Content markdown files, you will need to update this to use the robots key.
export default defineNuxtConfig({
routeRules: {
// use the `index` shortcut for simple rules
- '/secret/**': { index: false },
+ '/secret/**': { robots: false },
}
})