Skip to main content

Options

Less than 1 minute

Plugin Options

hostname

  • Type: string
  • Required: Yes

The domain name where the current site is deployed, the plugin needs this option to work.

extraUrls

  • Type: string[]
  • Required: No

Extra links to be included.

If you have some links not including in VuePress Router (normally in public directory or generated by other tools directly), you may need this option.

E.g.: ['/about.html', '/api/']

excludeUrls

  • Type: string[]
  • Default: ['/404.html']

Urls excluding from sitemap, starting with absolute path.

By default, all the urls generated by VuePress (excluding 404 page) will be added into sitemap.

sitemapFilename

  • Type: string
  • Default value: "sitemap.xml"

The output filename, relative to output directory.

sitemapXSLFilename

  • Type: string
  • Default value: "sitemap.xsl"

Output xsl filename, relative to dest folder.

sitemapXSLTemplate

  • Type: string
  • Default value: "vuepress-plugin-sitemap2/templates/sitemap.xsl"

XSL file path used as template.

changefreq

  • Type: "always" | "hourly" | "daily" | "weekly" |"monthly" | "yearly" | "never"
  • Default value: "daily"

Page default update frequency, will be overridden by sitemap.changefreq in Frontmatter.

priority

  • Type: number

  • Default: 0.5

Page priority, from 0 to 1.

modifyTimeGetter

  • Type: (page: Page, app: App) => string

  • Required: false

Last modify time getter. By default, the plugin will use the timestamp generated by git plugin.

Frontmatter Options

sitemap

  • Type: SitemapFrontmatterOptions | false
  • Required: No

false means exclude the page from sitemap.

sitemap.changefreq

  • Type: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | "never"
  • Default: "daily"

Page default update frequency. This will override changefreq in Plugin Options.

sitemap.priority

  • Type: number
  • Default: 0.5

Page priority, range from 0 to 1.