next-sitemap icon indicating copy to clipboard operation
next-sitemap copied to clipboard

Next App Directory `generateStaticParams` static pages not included in sitemap

Open noahflk opened this issue 3 months ago • 3 comments

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

noahflk avatar Mar 21 '24 19:03 noahflk

same issue here

adelindanaila avatar Apr 11 '24 07:04 adelindanaila

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.

VictorNIvanov avatar May 01 '24 12:05 VictorNIvanov