Skip to content

Commit ad850b1

Browse files
committed
add og image to blog
1 parent e2500b4 commit ad850b1

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

astro.config.mjs

+16
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import prefetch from "@astrojs/prefetch";
88

99
import robotsTxt from "astro-robots-txt";
1010

11+
const ogImage = 'https://codegenie.codes/og.jpg'
12+
1113
// https://astro.build/config
1214
export default defineConfig({
1315
site: 'https://codegenie.codes',
@@ -144,6 +146,20 @@ export default defineConfig({
144146
picture: '/brett-amazon-badge-photo-profile-pic-square-128.webp'
145147
},
146148
},
149+
head: [
150+
{
151+
tag: 'meta',
152+
attrs: { property: 'og:image', content: ogImage },
153+
},
154+
{
155+
tag: 'meta',
156+
attrs: { property: 'twitter:image', content: ogImage },
157+
},
158+
{
159+
tag: 'meta',
160+
attrs: { property: 'twitter:card', content: 'summary_large_image' },
161+
},
162+
],
147163
}),
148164
],
149165
}),

0 commit comments

Comments
 (0)