Skip to content

Commit c325e7a

Browse files
feat: unfurl og image
1 parent 558c2f6 commit c325e7a

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

gatsby-config.js

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ module.exports = {
77
title: `tjw.DEV`,
88
description: `Minimal maintnance landing page for some kind of web presence built with <a href="https://www.gatsbyjs.com/">Gatsby</a>, <a href="https://github.com/4Catalyzer/astroturf">Astroturf</a>, and <a href="https://tailwindcss.com/">Tailwind</a>.`,
99
author: `@thejustinwalsh`,
10+
image: `og-image.png`,
1011
},
1112
plugins: [
1213
`gatsby-plugin-react-helmet`,

src/components/seo.jsx

+15-3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ function SEO({ description, lang, meta, title }) {
1919
title
2020
description
2121
author
22+
image
2223
}
2324
}
2425
}
@@ -27,6 +28,7 @@ function SEO({ description, lang, meta, title }) {
2728

2829
const metaDescription = description || site.siteMetadata.description
2930
const defaultTitle = site.siteMetadata?.title
31+
const defaultImage = site.siteMetadata?.image
3032

3133
return (
3234
<Helmet
@@ -40,6 +42,10 @@ function SEO({ description, lang, meta, title }) {
4042
name: `description`,
4143
content: metaDescription,
4244
},
45+
{
46+
name: `image`,
47+
content: defaultImage,
48+
},
4349
{
4450
property: `og:title`,
4551
content: title,
@@ -52,6 +58,10 @@ function SEO({ description, lang, meta, title }) {
5258
property: `og:type`,
5359
content: `website`,
5460
},
61+
{
62+
property: `og:image`,
63+
content: defaultImage,
64+
},
5565
{
5666
name: `twitter:card`,
5767
content: `summary`,
@@ -68,10 +78,12 @@ function SEO({ description, lang, meta, title }) {
6878
name: `twitter:description`,
6979
content: metaDescription,
7080
},
81+
{
82+
property: `twitter:image`,
83+
content: defaultImage,
84+
},
7185
].concat(meta)}
72-
>
73-
<meta name="monetization" content="$ilp.uphold.com/hGqBNJM932UJ" />
74-
</Helmet>
86+
/>
7587
)
7688
}
7789

static/og-image.png

42.4 KB
Loading

0 commit comments

Comments
 (0)