Skip to content

Commit

Permalink
better utilization of EnumChangefreq type
Browse files Browse the repository at this point in the history
  • Loading branch information
Simek committed Nov 30, 2020
1 parent 01c629f commit 1f8a5d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/docusaurus-plugin-sitemap/src/pluginOptionSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ import {PluginOptions} from './types';

export const DEFAULT_OPTIONS: Required<PluginOptions> = {
cacheTime: 600 * 1000, // 600 sec - cache purge period.
changefreq: 'weekly' as EnumChangefreq,
changefreq: EnumChangefreq.WEEKLY,
priority: 0.5,
trailingSlash: false,
};

export const PluginOptionSchema = Joi.object({
cacheTime: Joi.number().positive().default(DEFAULT_OPTIONS.cacheTime),
changefreq: Joi.string()
.valid('always', 'hourly', 'daily', 'weekly', 'monthly', 'yearly', 'never')
.valid(...Object.values(EnumChangefreq))
.default(DEFAULT_OPTIONS.changefreq),
priority: Joi.number().min(0).max(1).default(DEFAULT_OPTIONS.priority),
trailingSlash: Joi.bool().default(false),
Expand Down

0 comments on commit 1f8a5d0

Please sign in to comment.