fix(v2): reject routeBasePath: '' ()

* routeBasePath: '' should be forbidden

* routeBasePath: '' should be forbidden

* commit

* try to trigger cla bot
This commit is contained in:
Sébastien Lorber 2020-08-31 19:59:27 +02:00 committed by GitHub
commit 1eb6e13fb7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 33 additions and 24 deletions
packages/docusaurus-plugin-content-blog/src

View file

@ -35,7 +35,10 @@ export const DEFAULT_OPTIONS = {
export const PluginOptionSchema = Joi.object({
path: Joi.string().default(DEFAULT_OPTIONS.path),
routeBasePath: Joi.string().allow('').default(DEFAULT_OPTIONS.routeBasePath),
routeBasePath: Joi.string()
// '' not allowed, see https://github.com/facebook/docusaurus/issues/3374
// .allow('')
.default(DEFAULT_OPTIONS.routeBasePath),
include: Joi.array().items(Joi.string()).default(DEFAULT_OPTIONS.include),
postsPerPage: Joi.number()
.integer()