mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-06 10:20:09 +02:00
refactor(theme-classic): use front matter from metadata for BlogPostPage (#6240)
This commit is contained in:
parent
8fe1ddf46a
commit
b0c23275f3
1 changed files with 9 additions and 6 deletions
|
@ -16,14 +16,17 @@ import TOC from '@theme/TOC';
|
||||||
|
|
||||||
function BlogPostPage(props: Props): JSX.Element {
|
function BlogPostPage(props: Props): JSX.Element {
|
||||||
const {content: BlogPostContents, sidebar} = props;
|
const {content: BlogPostContents, sidebar} = props;
|
||||||
|
const {assets, metadata} = BlogPostContents;
|
||||||
const {
|
const {
|
||||||
// TODO this frontmatter is not validated/normalized, it's the raw user-provided one. We should expose normalized one too!
|
title,
|
||||||
|
description,
|
||||||
|
nextItem,
|
||||||
|
prevItem,
|
||||||
|
date,
|
||||||
|
tags,
|
||||||
|
authors,
|
||||||
frontMatter,
|
frontMatter,
|
||||||
assets,
|
} = metadata;
|
||||||
metadata,
|
|
||||||
} = BlogPostContents;
|
|
||||||
const {title, description, nextItem, prevItem, date, tags, authors} =
|
|
||||||
metadata;
|
|
||||||
const {
|
const {
|
||||||
hide_table_of_contents: hideTableOfContents,
|
hide_table_of_contents: hideTableOfContents,
|
||||||
keywords,
|
keywords,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue