mirror of
https://github.com/kogakure/website-astro-stefanimhoff.de.git
synced 2026-02-03 20:15:27 +00:00
feat: deliver OG images as jpeg
This commit is contained in:
@@ -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/',
|
||||
|
||||
Reference in New Issue
Block a user