feat(v2): add an option to toggle trailing slash for urls in sitemap (#3426)

This commit is contained in:
Méril 2020-09-09 14:48:47 +01:00 committed by GitHub
parent 3638b1651a
commit d844ff6107
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 32 additions and 1 deletions

View file

@ -11,6 +11,7 @@ export const DEFAULT_OPTIONS: Required<PluginOptions> = {
cacheTime: 600 * 1000, // 600 sec - cache purge period.
changefreq: 'weekly',
priority: 0.5,
trailingSlash: false,
};
export const PluginOptionSchema = Joi.object({
@ -19,4 +20,5 @@ export const PluginOptionSchema = Joi.object({
.valid('always', 'hourly', 'daily', 'weekly', 'monthly', 'yearly', 'never')
.default(DEFAULT_OPTIONS.changefreq),
priority: Joi.number().min(0).max(1).default(DEFAULT_OPTIONS.priority),
trailingSlash: Joi.bool().default(false),
});