mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-02 16:29:47 +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 {
|
||||
const {content: BlogPostContents, sidebar} = props;
|
||||
const {assets, metadata} = BlogPostContents;
|
||||
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,
|
||||
assets,
|
||||
metadata,
|
||||
} = BlogPostContents;
|
||||
const {title, description, nextItem, prevItem, date, tags, authors} =
|
||||
metadata;
|
||||
} = metadata;
|
||||
const {
|
||||
hide_table_of_contents: hideTableOfContents,
|
||||
keywords,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue