Last active
January 6, 2020 00:33
-
-
Save seldo/845a5f54fe83a35a39ccb276985c22c2 to your computer and use it in GitHub Desktop.
Corrected twitter card for Gatsby
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return ( | |
<Helmet | |
htmlAttributes={{ | |
lang, | |
}} | |
title={title} | |
titleTemplate={`%s`} | |
meta={[ | |
{ | |
name: `description`, | |
content: site.siteMetadata.description, | |
}, | |
{ | |
property: `og:title`, | |
content: title, | |
}, | |
{ | |
property: `og:description`, | |
content: metaDescription, | |
}, | |
{ | |
property: `og:type`, | |
content: `website`, | |
}, | |
{ | |
property: `twitter:image`, | |
content: `https://example.com/a_full_image_url_goes_here.jpg` | |
}, | |
{ | |
property: `twitter:image:alt`, | |
content: `A beautiful photograph` | |
}, | |
{ | |
name: `twitter:card`, | |
content: `summary_large_image`, | |
}, | |
{ | |
name: `twitter:site`, | |
content: site.siteMetadata.author, | |
}, | |
{ | |
name: `twitter:title`, | |
content: title, | |
}, | |
{ | |
name: `twitter:description`, | |
content: site.siteMetadata.description, | |
}, | |
].concat(meta)} | |
/> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment