Skip to content

Commit 2b5af95

Browse files
committed
chore(site): use generated og image in structured data
1 parent 3775e0d commit 2b5af95

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

site/src/lib/schema.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ function buildArticleSchema(route: StarlightRouteData) {
101101
const dateModified =
102102
data.lastUpdated?.toISOString() || new Date().toISOString();
103103

104+
// Use the OG image for this specific page
105+
const ogImageUrl = `${siteConfig.siteUrl}/og/${route.id}.png`;
106+
104107
return {
105108
"@context": "https://schema.org",
106109
"@type": "Article",
@@ -119,7 +122,7 @@ function buildArticleSchema(route: StarlightRouteData) {
119122
url: siteConfig.authorUrl,
120123
image: siteConfig.authorImage,
121124
},
122-
image: siteConfig.logoUrl,
125+
image: ogImageUrl,
123126
inLanguage: "en",
124127
};
125128
}

0 commit comments

Comments
 (0)