next-sitemap
Sitemap generator for next.js. Generate sitemap(s) and robots.txt for all static/pre-rendered/dynamic/server-side pages. next-sitemap requires a basic config file ( next-sitemap.js) under your project root ✅ next-sitemap will load environment variables from .env files by default. Add next-sitemap as your postbuild script Having next-sitemap command & next-sitemap.js file may result in file opening instead of building sitemaps in windows machines.

https://www.npmjs.com/package/next-sitemap