Next.js Discord

Discord Forum

Is it possible to create a custom dynamic sitemap file named like sitemap-0.xml

Unanswered
Great Horned Owl posted this in #help-forum
Open in Discord
Great Horned OwlOP
Hey!

Using Nextjs 15 with App Router and wondering if I can make a custom sitemap-0.xml file that is dynamic and has all the blogs I made in Prismic?

I already have a blog/sitemap.ts with the logic but client wants it to appear like blog/sitemap-0.xml - which I'm finding tricky. I've read this:

https://nextjs.org/docs/app/api-reference/file-conventions/metadata/sitemap#generating-a-sitemap-using-code-js-ts

And I can't see any reference of doing something like this.

0 Replies