Shevky plugin that generates sitemap.xml during builds.
npm install @shevky/plugin-sitemapGenerate 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.xml during content:ready
- Optional pagination URLs (when seo.includePaging is enabled)
- Optional collection URLs (when seo.includeCollections is enabled)
- Generates absolute URLs based on identity.url
``bash`
npm i @shevky/plugin-sitemap
Add the plugin to your config:
`json`
{
"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:
`txt`
dist/sitemap.xml
- sitemapFilename: Output file name (default: sitemap.xml`)
MIT