mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-27 21:48:41 +02:00
* fix: add docs tag validation to solve #5478 fix: add docs tag validation to solve #5478 * Update docFrontMatter.ts * Update docs-create-doc.mdx * improve tag validation error messages + tests * improve tags doc * fix test Co-authored-by: slorber <lorber.sebastien@gmail.com>
This commit is contained in:
parent
812327155b
commit
194f429c1f
5 changed files with 46 additions and 5 deletions
|
@ -8,6 +8,7 @@
|
|||
import {
|
||||
JoiFrontMatter as Joi, // Custom instance for frontmatter
|
||||
URISchema,
|
||||
FrontMatterTagsSchema,
|
||||
validateFrontMatter,
|
||||
} from '@docusaurus/utils-validation';
|
||||
import {DocFrontMatter} from './types';
|
||||
|
@ -27,6 +28,7 @@ const DocFrontMatterSchema = Joi.object<DocFrontMatter>({
|
|||
slug: Joi.string(),
|
||||
sidebar_label: Joi.string(),
|
||||
sidebar_position: Joi.number(),
|
||||
tags: FrontMatterTagsSchema,
|
||||
pagination_label: Joi.string(),
|
||||
custom_edit_url: URISchema.allow('', null),
|
||||
parse_number_prefixes: Joi.boolean(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue