feat: add new OG image design

This commit is contained in:
Stefan Imhoff
2026-01-21 13:08:02 +01:00
committed by Stefan Imhoff
parent b49b0f95fc
commit 61c722c84f
101 changed files with 7 additions and 2 deletions

View File

@@ -33,13 +33,18 @@ const {
cover = '/assets/images/branding/og/bonsai.jpg',
} = Astro.props;
const processedCover = cover.endsWith('.webp') ? cover.replace(/\.webp$/, '.jpg') : cover;
const ogImage =
cover.startsWith('/assets/images/cover/') && cover.endsWith('.webp')
? cover
.replace('/assets/images/cover/', '/assets/images/branding/og/')
.replace(/\.webp$/, '.jpg')
: cover;
const currentPath = new URL(Astro.request.url).pathname;
const fullTitle = `${title} · ${site.description}`;
const fullDescription = description || site.description;
const fullUrl = site.url + currentPath;
const fullImage = site.url + processedCover;
const fullImage = site.url + ogImage;
const schema = JSON.stringify({
'@context': 'https://schema.org/',