Generate sitemap.xml for Shevky sites. The plugin collects published pages, optionally includes paginated listings and configured collections, then writes the sitemap into dist/sitemap.xml.
- Builds
sitemap.xmlduringcontent:ready - Optional pagination URLs (when
seo.includePagingis enabled) - Optional collection URLs (when
seo.includeCollectionsis enabled) - Generates absolute URLs based on
identity.url
npm i @shevky/plugin-sitemapAdd the plugin to your config:
{
"identity": {
"url": "https://example.com"
},
"pluginConfigs": {
"shevky-sitemap": {
"sitemapFilename": "sitemap.xml"
}
},
"seo": {
"includePaging": true,
"includeCollections": true
},
"plugins": [
"@shevky/plugin-sitemap"
]
}The sitemap will be generated at:
dist/sitemap.xmlsitemapFilename: Output file name (default:sitemap.xml)
MIT