mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-06 02:08:55 +02:00
feat(content-docs): add custom props front matter (#6619)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
This commit is contained in:
parent
59289ed4d5
commit
665d164351
10 changed files with 69 additions and 8 deletions
|
@ -210,6 +210,19 @@ describe('validateDocFrontMatter sidebar_position', () => {
|
|||
});
|
||||
});
|
||||
|
||||
describe('validateDocFrontMatter sidebar_custom_props', () => {
|
||||
testField({
|
||||
prefix: 'sidebar_custom_props',
|
||||
validFrontMatters: [
|
||||
{sidebar_custom_props: {}},
|
||||
{sidebar_custom_props: {prop: 'custom', number: 1, boolean: true}},
|
||||
],
|
||||
invalidFrontMatters: [
|
||||
[{sidebar_custom_props: ''}, 'must be of type object'],
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
describe('validateDocFrontMatter custom_edit_url', () => {
|
||||
testField({
|
||||
prefix: 'custom_edit_url',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue