mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-10 07:37:19 +02:00
fix(v2): relax URI validation (#3227)
* relax URI validation * add regex * add test * fix linting error * fix formatting * use URL rather than regex
This commit is contained in:
parent
fe281a8ebe
commit
181a6174c7
9 changed files with 44 additions and 7 deletions
|
@ -10,6 +10,7 @@ import {
|
|||
RemarkPluginsSchema,
|
||||
RehypePluginsSchema,
|
||||
AdmonitionsSchema,
|
||||
URISchema,
|
||||
} from '@docusaurus/utils-validation';
|
||||
|
||||
export const DEFAULT_OPTIONS: PluginOptions = {
|
||||
|
@ -31,7 +32,7 @@ export const DEFAULT_OPTIONS: PluginOptions = {
|
|||
|
||||
export const PluginOptionSchema = Joi.object({
|
||||
path: Joi.string().default(DEFAULT_OPTIONS.path),
|
||||
editUrl: Joi.string().uri(),
|
||||
editUrl: URISchema,
|
||||
routeBasePath: Joi.string().allow('').default(DEFAULT_OPTIONS.routeBasePath),
|
||||
homePageId: Joi.string().optional(),
|
||||
include: Joi.array().items(Joi.string()).default(DEFAULT_OPTIONS.include),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue