Closed Anoesj closed 1 year ago
I tried a few things, the current version fixes the spamming of "Generating sitemaps", it now only generates it once.
EDIT: Will release a new version today which will add the pre-rendered routes.
Sounds great, thanks so much!
Just released a new Version
Works great, thank you! 🥳
When running
pnpm nuxt generate
, the following message is repeated for every generated html fileLet me give an example of a
sitemap.xml
and thepnpm nuxt generate
output in a very common Nuxt 3 setup.Contents of
pages/
directory:users/
index.vue
id
andname
of all users from a backend and renders links to their profile pages. In this case, it receives one user with id1
and renders a link to/users/1
. The Nuxt crawler should therefore prerender.output/public/users/1/index.html
.[id].vue
[id]
from a backend and renders a user profile page.index.vue
id
,route
andtitle
of every page from a backend and renders links to their respective pages. Because this route lists links to every available page, the Nuxt crawler should therefore prerender all of those routes.[...slug].vue
Output of
pnpm nuxt generate
:Firstly, this output is confusing, because it feels like this output suggests that the
sitemap.xml
file is overwritten many times.Secondly, one would think that all the routes that were prerendered by Nuxt would appear in the generated
sitemap.xml
, but only the static/non-dynamic routes were actually added tositemap.xml
, namely:/
(from/pages/index.vue
)/users
(from/pages/users/index.vue
)Could you reply to both of these issues and clear up if this is the expected behavior?
Thank you!