mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-27 05:28:43 +02:00
feat(docs,blog,pages): add support for "unlisted" front matter - hide md content in production (#8004)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
This commit is contained in:
parent
7a023a2c41
commit
683ba3d2a0
131 changed files with 2449 additions and 303 deletions
|
@ -9,6 +9,7 @@ import {
|
|||
Joi,
|
||||
validateFrontMatter,
|
||||
FrontMatterTOCHeadingLevels,
|
||||
ContentVisibilitySchema,
|
||||
} from '@docusaurus/utils-validation';
|
||||
import type {FrontMatter} from '@docusaurus/plugin-content-pages';
|
||||
|
||||
|
@ -18,7 +19,7 @@ const PageFrontMatterSchema = Joi.object<FrontMatter>({
|
|||
wrapperClassName: Joi.string(),
|
||||
hide_table_of_contents: Joi.boolean(),
|
||||
...FrontMatterTOCHeadingLevels,
|
||||
});
|
||||
}).concat(ContentVisibilitySchema);
|
||||
|
||||
export function validatePageFrontMatter(frontMatter: {
|
||||
[key: string]: unknown;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue