Add a dynamic sitemap to Next.js website using pages or app directory
In this post, we will explore how to add a dynamic sitemap to a Next.js website using the app directory. A sitemap is a file that lists all the pages of a website and helps search engines understand the structure of the site. By the end of this post, you will have a fully functional dynamic sitemap for your Next.js website.
claritydev.net
I think there is already a package next sitemap that can do the job
Yeah, it's called next-sitemap, but you don't really need it in this case.