Save time by Generating Sitemaps Dynamically in NextJSby@mindasoft

Save time by Generating Sitemaps Dynamically in NextJS

tldt arrow
Read on Terminal Reader
Read this story w/o Javascript

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.

Company Mentioned

Mention Thumbnail
featured image - Save time by Generating Sitemaps Dynamically in NextJS
Mindasoft HackerNoon profile picture

@mindasoft

Mindasoft

App development company

react to story with heart

RELATED STORIES

L O A D I N G
. . . comments & more!