mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-03 16:59:06 +02:00
Enable custom meta description for custom pages (#752)
This commit is contained in:
parent
18c01327a3
commit
c47af6be4b
4 changed files with 32 additions and 0 deletions
|
@ -36,6 +36,7 @@ class Head extends React.Component {
|
|||
<title>{this.props.title}</title>
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<meta name="generator" content="Docusaurus" />
|
||||
<meta name="description" content={this.props.description} />
|
||||
<meta property="og:title" content={this.props.title} />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content={this.props.url} />
|
||||
|
|
|
@ -509,6 +509,7 @@ async function execute() {
|
|||
language={language}
|
||||
config={siteConfig}
|
||||
title={ReactComp.title}
|
||||
description={ReactComp.description}
|
||||
metadata={{id: pageID}}>
|
||||
<ReactComp language={language} />
|
||||
</Site>
|
||||
|
@ -528,6 +529,7 @@ async function execute() {
|
|||
title={ReactComp.title}
|
||||
language={language}
|
||||
config={siteConfig}
|
||||
description={ReactComp.description}
|
||||
metadata={{id: pageID}}>
|
||||
<ReactComp language={language} />
|
||||
</Site>
|
||||
|
@ -545,6 +547,7 @@ async function execute() {
|
|||
title={ReactComp.title}
|
||||
language={language}
|
||||
config={siteConfig}
|
||||
description={ReactComp.description}
|
||||
metadata={{id: pageID}}>
|
||||
<ReactComp language={language} />
|
||||
</Site>
|
||||
|
|
|
@ -449,6 +449,7 @@ function execute(port) {
|
|||
language={language}
|
||||
config={siteConfig}
|
||||
title={ReactComp.title}
|
||||
description={ReactComp.description}
|
||||
metadata={{id: path.basename(userFile, '.js')}}>
|
||||
<ReactComp language={language} />
|
||||
</Site>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue