Too Long; Didn't Read
In this post, you will generate your own Next js sitemap in under 1 minute. In this tutorial, I have used next-connect to handle requests. You can fetch all your posts through an API endpoint instead of using the Blog model. Visit your website for development in development mode and you will see that `sitemap.xml` is generated in your public folder. Copy this code into satemap.js and edit your website section to edit your section. Use the sitemaps-next-connect package to create a sitemapp.js file in the api folder.