mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-28 14:08:21 +02:00
feat(content-docs): draft docs excluded from build & sidebars (#6457)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com> Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
This commit is contained in:
parent
ee4c984bc7
commit
5fb0a2e274
27 changed files with 396 additions and 58 deletions
|
@ -378,3 +378,19 @@ describe('toc min/max consistency', () => {
|
|||
],
|
||||
});
|
||||
});
|
||||
|
||||
describe('validateDocFrontMatter draft', () => {
|
||||
testField({
|
||||
prefix: 'draft',
|
||||
validFrontMatters: [{draft: true}, {draft: false}],
|
||||
convertibleFrontMatter: [
|
||||
[{draft: 'true'}, {draft: true}],
|
||||
[{draft: 'false'}, {draft: false}],
|
||||
],
|
||||
invalidFrontMatters: [
|
||||
[{draft: 'yes'}, 'must be a boolean'],
|
||||
[{draft: 'no'}, 'must be a boolean'],
|
||||
[{draft: ''}, 'must be a boolean'],
|
||||
],
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue