feat: deliver OG images as jpeg

This commit is contained in:
Stefan Imhoff
2025-05-02 08:11:54 +02:00
parent 0907957e95
commit 138eaca4d6

View File

@@ -33,11 +33,14 @@ const {
title,
cover = '/assets/images/branding/og/bonsai.jpg',
} = Astro.props;
const processedCover = cover.endsWith('.webp') ? cover.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 + cover;
const fullImage = site.url + processedCover;
const schema = JSON.stringify({
'@context': 'https://schema.org/',