Add twitterImage to siteConfig options (#580)

This commit is contained in:
Joel Marcey 2018-04-17 21:04:39 -07:00 committed by GitHub
parent f0197700c5
commit e738bbd99e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 11 deletions

View file

@ -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"