Automatically generate or serve dynamic sitemap.xml for Nuxt projects!
💡 Using Nuxt 3? The repo has moved to nuxt-modules/sitemap.
💡 If you intend to use this module for Nuxt 2, you should stay on version 2.x.
The Dynamic host option made by Rylax
Add the sitemap configuration in your nuxt.config.js file:
sitemap: {
dynamicHost: true,
routes: async (host) => {
// Now you have access to the host variable
// Implement logic to generate sitemap routes based on the host
}
}