Next.js Discord

Discord Forum

Dynamic file names?

Unanswered
Red ant posted this in #help-forum
Open in Discord
Red antOP
Hi,
So I wa trying to setup some dynamic sitemaps.xml and wanted to create an index for them all as I want to break them down in ~10K urls per file, however it seems like creating a folder like "sitemap-[id].xml" is not valid and does not work. I could do a sub-path (for example "sitemaps/[id]/sitemap.xml") but the issue with this specific notation is that sitemaps can only contain urls that are part of their path or lower so if I do create an id or something the sitemap would be invalid.

Is there any way to have the file name be dynamic? Am I missing something ?

Thanks!

0 Replies