mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-12 00:27:21 +02:00
fix(v2): allow relative URLs in URISchema #3449
This commit is contained in:
parent
55cd7a7b5a
commit
fe78cbeff5
3 changed files with 7 additions and 3 deletions
|
@ -26,7 +26,7 @@ export const RehypePluginsSchema = MarkdownPluginsSchema;
|
|||
export const AdmonitionsSchema = Joi.object().default({});
|
||||
|
||||
export const URISchema = Joi.alternatives(
|
||||
Joi.string().uri(),
|
||||
Joi.string().uri({allowRelative: true}),
|
||||
Joi.custom((val, helpers) => {
|
||||
try {
|
||||
const url = new URL(val);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue