mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-02 16:29:47 +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
|
@ -19,18 +19,10 @@ import styles from './styles.module.css';
|
|||
function MDXPage(props: Props): JSX.Element {
|
||||
const {content: MDXPageContent} = props;
|
||||
const {
|
||||
// TODO this frontmatter is not validated/normalized, it's the raw user-provided one. We should expose normalized one too!
|
||||
frontMatter,
|
||||
metadata,
|
||||
metadata: {title, description, permalink, frontMatter},
|
||||
} = MDXPageContent;
|
||||
|
||||
const {
|
||||
title,
|
||||
description,
|
||||
wrapperClassName,
|
||||
hide_table_of_contents: hideTableOfContents,
|
||||
} = frontMatter;
|
||||
const {permalink} = metadata;
|
||||
const {wrapperClassName, hide_table_of_contents: hideTableOfContents} =
|
||||
frontMatter;
|
||||
|
||||
return (
|
||||
<Layout
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue