generateSitemaps
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
In production, your generated sitemaps will be available at /.../sitemap/[id].xml
. For example, /product/sitemap/1.xml
.
In development, you can view the generated sitemap on /.../sitemap.xml/[id]
. For example, /product/sitemap.xml/1
. This difference is temporary and will follow the production format.
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.