Sitemap generator.
This plugin scans your dist folder to generate sitemap.xml and robots.txt files.
-
Type:
string
-
Default:
'http://localhost/'
Base URI.
-
Type:
string
-
Default:
'docs'
Specify a path prefix to be added to all paths.
-
Type:
string[]
-
Default:
[]
Array of strings with manual routes.
const names = [
'John',
'Bryce',
'Addison',
'Dana',
]
const dynamicRoutes = names.map(name => `/names/${name}`)
Sitemap({ dynamicRoutes })
-
Type:
string[]
-
Default:
[]
Array of strings with excluded routes.
generateSitemap({
exclude: ['/admin', '/private']
})
-
Type:
string
-
Default:
'dist'
Output/Scan directory.
-
Type:
string | (route: string) => string
-
Default:
'daily'
Change frequency option for sitemap.
-
Type:
number | (route: string) => number
-
Default:
1
Priority option for sitemap.
-
Type:
Date | (route: string) => Date
-
Default:
new Date()
Last modification option for sitemap.
-
Type:
boolean
-
Default:
false
Converts XML into a human readable format
-
Type:
RobotOption[]
-
Default:
[{ userAgent: '*', allow: '/' }]
RobotOption:
-
userAgent:
string
-
allow?:
string | string[]
-
disallow?:
string | string[]
-
crawlDelay?:
number
-
cleanParam?:
string