Skip to content

Commit aafe78b

Browse files
committed
feat(seo): add Open Graph image and social preview meta tags
- Add og-image.png (1200x630) for social link previews - Add og:image, og:image:width, og:image:height meta tags - Add twitter:image and upgrade twitter:card to summary_large_image
1 parent 106895f commit aafe78b

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

apps/web/public/og-image.png

281 KB
Loading

apps/web/scripts/prerender.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,13 @@ function buildHead(path: string): string {
125125
`<meta property="og:url" content="${url}"/>`,
126126
`<meta property="og:type" content="${seo.type}"/>`,
127127
`<meta property="og:site_name" content="ooxml.dev"/>`,
128-
`<meta name="twitter:card" content="summary"/>`,
128+
`<meta property="og:image" content="${SITE_URL}/og-image.png"/>`,
129+
`<meta property="og:image:width" content="1200"/>`,
130+
`<meta property="og:image:height" content="630"/>`,
131+
`<meta name="twitter:card" content="summary_large_image"/>`,
129132
`<meta name="twitter:title" content="${escapeHtml(seo.title)}"/>`,
130133
`<meta name="twitter:description" content="${escapeHtml(seo.description)}"/>`,
134+
`<meta name="twitter:image" content="${SITE_URL}/og-image.png"/>`,
131135
];
132136

133137
// JSON-LD structured data

0 commit comments

Comments
 (0)