mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-20 03:32:29 +02:00
feat(content-pages): front matter validation, include front matter in metadata (#6400)
This commit is contained in:
parent
e5801e49f6
commit
fdf59f30f0
7 changed files with 103 additions and 37 deletions
|
@ -1,2 +1,3 @@
|
|||
# Index
|
||||
|
||||
Markdown index page
|
||||
Markdown index page
|
||||
|
|
|
@ -39,11 +39,20 @@ describe('docusaurus-plugin-content-pages', () => {
|
|||
type: 'mdx',
|
||||
permalink: '/hello/',
|
||||
source: path.posix.join('@site', pluginPath, 'hello', 'index.md'),
|
||||
description: 'Markdown index page',
|
||||
frontMatter: {},
|
||||
title: 'Index',
|
||||
},
|
||||
{
|
||||
type: 'mdx',
|
||||
permalink: '/hello/mdxPage',
|
||||
source: path.posix.join('@site', pluginPath, 'hello', 'mdxPage.mdx'),
|
||||
description: 'my mdx page',
|
||||
title: 'mdx page',
|
||||
frontMatter: {
|
||||
description: 'my mdx page',
|
||||
title: 'mdx page',
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'jsx',
|
||||
|
@ -64,6 +73,9 @@ describe('docusaurus-plugin-content-pages', () => {
|
|||
'hello',
|
||||
'translatedMd.md',
|
||||
),
|
||||
description: 'translated markdown page',
|
||||
frontMatter: {},
|
||||
title: undefined,
|
||||
},
|
||||
{
|
||||
type: 'jsx',
|
||||
|
@ -113,11 +125,20 @@ describe('docusaurus-plugin-content-pages', () => {
|
|||
type: 'mdx',
|
||||
permalink: '/hello/',
|
||||
source: path.posix.join('@site', pluginPath, 'hello', 'index.md'),
|
||||
description: 'Markdown index page',
|
||||
frontMatter: {},
|
||||
title: 'Index',
|
||||
},
|
||||
{
|
||||
type: 'mdx',
|
||||
permalink: '/hello/mdxPage',
|
||||
source: path.posix.join('@site', pluginPath, 'hello', 'mdxPage.mdx'),
|
||||
description: 'my mdx page',
|
||||
title: 'mdx page',
|
||||
frontMatter: {
|
||||
description: 'my mdx page',
|
||||
title: 'mdx page',
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'jsx',
|
||||
|
@ -128,6 +149,9 @@ describe('docusaurus-plugin-content-pages', () => {
|
|||
type: 'mdx',
|
||||
permalink: '/hello/translatedMd',
|
||||
source: path.posix.join(frTranslationsPath, 'hello', 'translatedMd.md'),
|
||||
description: 'translated markdown page (fr)',
|
||||
frontMatter: {},
|
||||
title: undefined,
|
||||
},
|
||||
{
|
||||
type: 'jsx',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue