mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-16 18:46:57 +02:00
Add twitterImage
to siteConfig options (#580)
This commit is contained in:
parent
f0197700c5
commit
e738bbd99e
3 changed files with 25 additions and 11 deletions
|
@ -35,7 +35,6 @@ class Head extends React.Component {
|
|||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content={this.props.url} />
|
||||
<meta property="og:description" content={this.props.description} />
|
||||
{this.props.config.noIndex && <meta name="robots" content="noindex" />}
|
||||
{this.props.config.ogImage && (
|
||||
<meta
|
||||
property="og:image"
|
||||
|
@ -46,6 +45,18 @@ class Head extends React.Component {
|
|||
}
|
||||
/>
|
||||
)}
|
||||
<meta name="twitter:card" content="summary" />
|
||||
{this.props.config.twitterImage && (
|
||||
<meta
|
||||
name="twitter:image"
|
||||
content={
|
||||
this.props.config.url +
|
||||
this.props.config.baseUrl +
|
||||
this.props.config.twitterImage
|
||||
}
|
||||
/>
|
||||
)}
|
||||
{this.props.config.noIndex && <meta name="robots" content="noindex" />}
|
||||
{this.props.redirect && (
|
||||
<meta
|
||||
http-equiv="refresh"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue