next-sitemap
next-sitemap copied to clipboard
Next App Directory `generateStaticParams` static pages not included in sitemap
Describe the bug I understand why dynamic pages are not part of the sitemap. But static pages are known at build time and could be added to the sitemap. Unfortunately, this is not happening at the moment.
To Reproduce
- Add the
generateStaticParams
function to your Server Side Component in Next.js v14. - Export multiple static paths from said function
- Build the site, and observe the created sitemap
same issue here
Same here...
I also noticed that the following happens:
- [lang]/blog/[blogpost] - get added to the sitemap (generateStaticParams() used)
- [lang]/products/[category]/ - gets added to the sitemap (generateStaticParams() used)
- [lang]/products/[category]/[product_name] - all of the actual product pages are missing (generateStaticParams() used as well but not working in this case)
In my case it seems like its being limited at a "depth" of 3.