Skip to content

Instantly share code, notes, and snippets.

@yash-thakur
Created December 5, 2019 07:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yash-thakur/9f7fd3b277914cae65970cdd60553922 to your computer and use it in GitHub Desktop.
Save yash-thakur/9f7fd3b277914cae65970cdd60553922 to your computer and use it in GitHub Desktop.
Seo Component using Helmet to create required meta tags
<Helmet>
<meta charSet="utf-8"/>
<title>{_.get(this.props, "title", "")}</title>
<meta name="title" content={_.get(this.props, "title", "")} />
<meta name="og:title" content={_.get(this.props, "title", "")} />
<meta name="twitter:title" content={_.get(this.props, "title", "")} />
<meta name="description" content={_.get(this.props, "description", "")} />
<meta name="twitter:description" content={_.get(this.props, "description", "")} />
<meta name="og:description" content={_.get(this.props, "description", "")} />
<meta name="og:site_name" content="CryptoForecast Platform" />
<meta name="twitter:card" content="summary_large_image" />
<meta property="og:type" content="page" />
<meta property="og:url" content={`https://${config.site_url}/${_.get(this.props, "path", "")}`} />
<meta itemProp="image" content={_.get(this.props, "imageUrl", "")} />
<meta name="twitter:image:src" content={_.get(this.props, "imageUrl", "")} />
<meta property="og:image" content={_.get(this.props, "imageUrl", "")} />
</Helmet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment