We are an ecommerce, and we have a use case that make us generate multiple sitemaps (by store and lang).
Nextjs give us the ability to create sitemaps in any part of the tree of urls. But it don’t give us any way of access the current route params of the url.
for example /[store]/[lang]/sitemap.xml don’t have any way to access the store and lang params.
Before I go into potential solutions, could you please provide a bit more background on your current tech stack? I see that you’re using Next.js for the frontend, but it would be helpful to know which version of Next.js you are using, as well as whether you are utilizing App Routing or Pages Routing.
This information will help community members, including myself, better understand your problem so we can share relevant solutions.
I’ve been using the same package for the last two years with Next.js versions 13, 14, and now 15, and I haven’t encountered any issues. Could you please clarify what’s wrong? How did you determine that it’s deprecated? It’s still available on the npm store.
Please provide more specific details about your problem.