generateSitemaps
Learn how to use the generateSiteMaps function to create multiple sitemaps for your application.
You can use the generateSitemaps function to generate multiple sitemaps for your application.
Returns
The generateSitemaps returns an array of objects with an id property.
URLs
Your generated sitemaps will be available at /.../sitemap/[id].xml. For example, /product/sitemap/1.xml.
Example
For example, to split a sitemap using generateSitemaps, return an array of objects with the sitemap id. Then, use the id to generate the unique sitemaps.
Version History
| Version | Changes |
|---|---|
v15.0.0 | generateSitemaps now generates consistent URLs between development and production |
v13.3.2 | generateSitemaps introduced. In development, you can view the generated sitemap on /.../sitemap.xml/[id]. For example, /product/sitemap.xml/1. |