feat: generate /fr/sitemap.xml via custom Nitro route

@nuxtjs/sitemap is incompatible with app.baseURL: '/fr/' here — it broke
nginx routing (403) on this deployment where /fr/ is served via an alias
to a separate static build. A hand-rolled Nitro route sidesteps the
module entirely and gets prerendered to a plain sitemap.xml file at the
root of the generated output, matching what the nginx alias expects.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
Djeex
2026-08-11 11:44:46 +02:00
co-authored by Claude Sonnet 5
parent dd06d01b62
commit c93134975a
2 changed files with 29 additions and 0 deletions
+6
View File
@@ -44,5 +44,11 @@ export default defineNuxtConfig({
}
},
nitro: {
prerender: {
routes: ['/sitemap.xml']
}
},
compatibilityDate: '2024-10-24'
})