Skip to content

How to create sitemaps at buildtime instead of runtime. #571

Discussion options

You must be logged in to vote

So is there a way to generate sitemap at build time, so API call is made when building and whole xml file with all urls in generated at build time?

https://github.com/iamvishnusankar/next-sitemap#additional-paths-function

Q2) Is it possible to define in build script if I only want to generate one specific sitemap like my-custom-sitemap-2.xml and not all the sitemaps?

Yes, you can set the sitemapBaseFileName and disable generation of index sitemap.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Chirag-dev9
Comment options

Answer selected by iamvishnusankar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants