DEV Community

Discussion on: Sitemap for dynamic routes in NuxtJS

Collapse
 
sushiljic profile image
Sushil G.C.

Hi Andrey

Great Post. Loved it.
I was wondering what could be setup for SSR type webapp.
For example,
I usually deploy nuxt SSR webapp using npm run build in production and I would be very helpful If can use above method.

I tried looking for hook with build:done something but couldnot get any in Link.
nuxtlink

Also Since you have generate all dynamic 10 pages of users but for realtime siite,
We will have dynamic new content that are being generated after generate nuxt command so what can be the best solution?

❤️ from Nepal

Collapse
 
gaisinskii profile image
Andrey Gaisinskii

Sorry for the late reply, but I think there is no best solution in this case.

In my case I am using SSG and I don't have such problem because my routes and sitemap files are FIXED in some way or another, if someone want to add a new page or other content the entire app has to be rebuild hence the sitemap will be rebuilt too.

In your case the content is always dynamic, but the sitemap will be generated only after deploy if I understand correctly. I think it is better to address this problem to the maintainer of the library, because I remember that he was going to add such feature.

Collapse
 
pedroslvieira profile image
Pedro Soares

Hey Sushil! Have you found a solution for this problem? I have to solve the same issue and would like to understand how to serve the sitemap in production when new content is added to the website.

cheers!