Skip to content

Commit 0bfcb94

Browse files
committed
Add head properties needed for twitter card
Doesn't seem to like the "normal" open graph properties when playing around locally. Setting the twitter thingy to summary and using a full path gets a card to be displayed.
1 parent e7e6cf9 commit 0bfcb94

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

theme.config.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,11 @@ export default {
4242
</>
4343
)}
4444
{canonical && <link rel="canonical" href={canonical} />}
45-
{image && <meta name="og:image" content={image} />}
46-
<meta property="og:image" content="/img/og-image.png" />
45+
<meta
46+
property="og:image"
47+
content={image ?? "https://graphql.org//img/og-image.png"}
48+
/>
49+
<meta name="twitter:card" content="summary" />
4750
<meta property="twitter:site" content="@graphql" />
4851
</>
4952
)

0 commit comments

Comments
 (0)