fix: paths for OG images

This commit is contained in:
Stefan Imhoff
2026-01-26 12:02:59 +01:00
committed by Stefan Imhoff
parent ceadc30005
commit da1c4bbd22

View File

@@ -34,8 +34,8 @@ const {
} = Astro.props; } = Astro.props;
const ogImage = const ogImage =
cover.startsWith('/images/cover/') && cover.endsWith('.webp') cover.startsWith('/assets/images/cover/') && cover.endsWith('.webp')
? cover.replace('/images/cover/', '/assets/images/og/').replace(/\.webp$/, '.jpg') ? cover.replace('/assets/images/cover/', '/assets/images/og/').replace(/\.webp$/, '.jpg')
: cover; : cover;
const currentPath = new URL(Astro.request.url).pathname; const currentPath = new URL(Astro.request.url).pathname;