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;
|
} = 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;
|
||||||
|
|||||||
Reference in New Issue
Block a user