Skip to content

Commit f4e2b2a

Browse files
committed
fix: Version OG image URLs
1 parent 909b93c commit f4e2b2a

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

‎src/layouts/BaseLayout.astro‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const {
2323
description = siteConfig.description,
2424
canonical,
2525
keywords = [],
26-
image = `${siteConfig.url}/og/index.png`,
26+
image = `${siteConfig.url}/og/index.png?v=${siteConfig.ogVersion}`,
2727
imageAlt,
2828
noIndex = false,
2929
structuredData = [],

‎src/lib/site.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ export const siteConfig = {
33
tagline: "The open source taint analysis engine for the AI era",
44
description: "Turn one-off review into unlimited scans with the open source taint analysis engine that allows to combine model reasoning with formal program analysis.",
55
ogTagline: "Turn one-off review into unlimited scans",
6+
ogVersion: "20260816",
67
url: "https://opentaint.org",
78
author: "Seqra Team",
89
twitter: "@seqradev",

‎src/pages/blog/[slug].astro‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export async function getStaticPaths() {
1717
}
1818
1919
const { post } = Astro.props;
20+
const ogImage = `${siteConfig.url}/og/${post.slug}.png?v=${siteConfig.ogVersion}`;
2021
2122
let Content: any = null;
2223
let headings: { depth: number; slug: string; text: string }[] = [];
@@ -56,7 +57,7 @@ const blogPostingSchema = {
5657
url: `${siteConfig.url}/apple-touch-icon.png`,
5758
},
5859
},
59-
image: `${siteConfig.url}/og/${post.slug}.png`,
60+
image: ogImage,
6061
url: post.canonicalUrl,
6162
mainEntityOfPage: post.canonicalUrl,
6263
};
@@ -87,7 +88,7 @@ const breadcrumbSchema = {
8788
};
8889
---
8990

90-
<BaseLayout title={post.title} description={post.description} canonical={post.canonicalUrl} image={`${siteConfig.url}/og/${post.slug}.png`} keywords={post.keywords} structuredData={[blogPostingSchema, breadcrumbSchema]} ogType="article" articlePublishedTime={post.date} articleModifiedTime={post.updatedDate || post.date}>
91+
<BaseLayout title={post.title} description={post.description} canonical={post.canonicalUrl} image={ogImage} keywords={post.keywords} structuredData={[blogPostingSchema, breadcrumbSchema]} ogType="article" articlePublishedTime={post.date} articleModifiedTime={post.updatedDate || post.date}>
9192
<div class="min-h-screen bg-background flex flex-col">
9293
<SiteHeader />
9394
<main id="main" class="flex-1 pt-28 xl:pt-16">{/* pt-28 clears the header plus the mobile TOC bar — a measured offset, not a ladder step. */}

0 commit comments

Comments
 (0)