sitemap
About 200 wordsLess than 1 minute
2025-10-08
Usage
The theme provides out-of-the-box configuration to generate a sitemap.xml file for the site. To enable it, the following configuration is required:
import { defineUserConfig } from 'vuepress'
import { plumeTheme } from 'vuepress-theme-plume'
export default defineUserConfig({
theme: plumeTheme({
hostname: 'https://your-site.com',
})
})If customization of the sitemap is needed, it can be achieved through the plugins.sitemap configuration.
import { defineUserConfig } from 'vuepress'
import { plumeTheme } from 'vuepress-theme-plume'
export default defineUserConfig({
theme: plumeTheme({
plugins: {
sitemap: {
// ... sitemap configurations
}
}
})
})Refer to the documentation for the complete configuration.
Limitations
hostname is required
hostname is a prerequisite for sitemap generation. Without it the theme silently skips generating the sitemap, leaving you with a config that appears to work but does nothing.
For multi-language sites, provide the main site address; language prefixes are added automatically.
Production builds only
The sitemap is not generated in dev mode (vuepress dev) . Check dist/sitemap.xml after pnpm docs:build instead.
hostname also affects SEO
The SEO plugin shares the same hostname as the sitemap. Configure it once if you enable both.
