Skip to content

Commit fd79db8

Browse files
committed
Add og image
1 parent d6f89df commit fd79db8

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

205 KB
Loading

src/components/Seo.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import React from 'react'
99
import PropTypes from 'prop-types'
1010
import { Helmet } from 'react-helmet'
1111
import { useStaticQuery, graphql } from 'gatsby'
12+
import ogImage from "../assets/images/codehelp-og-image.jpg"
1213

1314
function Seo({ description, lang, meta, title }) {
1415
const { site } = useStaticQuery(
@@ -50,6 +51,10 @@ function Seo({ description, lang, meta, title }) {
5051
property: `og:type`,
5152
content: `website`,
5253
},
54+
{
55+
property: `og:image`,
56+
content: ogImage,
57+
},
5358
{
5459
name: `twitter:card`,
5560
content: `summary`,
@@ -66,6 +71,10 @@ function Seo({ description, lang, meta, title }) {
6671
name: `twitter:description`,
6772
content: metaDescription,
6873
},
74+
{
75+
property: `twitter:image`,
76+
content: ogImage,
77+
},
6978
].concat(meta)}
7079
title={title}
7180
titleTemplate={defaultTitle ? `%s | ${defaultTitle}` : null}

0 commit comments

Comments
 (0)