mirror of
https://github.com/kogakure/website-astro-stefanimhoff.de.git
synced 2026-02-03 12:05:28 +00:00
fix: paths for OG images
This commit is contained in:
committed by
Stefan Imhoff
parent
ceadc30005
commit
da1c4bbd22
@@ -34,8 +34,8 @@ const {
|
||||
} = Astro.props;
|
||||
|
||||
const ogImage =
|
||||
cover.startsWith('/images/cover/') && cover.endsWith('.webp')
|
||||
? cover.replace('/images/cover/', '/assets/images/og/').replace(/\.webp$/, '.jpg')
|
||||
cover.startsWith('/assets/images/cover/') && cover.endsWith('.webp')
|
||||
? cover.replace('/assets/images/cover/', '/assets/images/og/').replace(/\.webp$/, '.jpg')
|
||||
: cover;
|
||||
|
||||
const currentPath = new URL(Astro.request.url).pathname;
|
||||
|
||||
Reference in New Issue
Block a user