feat: amélioration des images meta og

This commit is contained in:
Jalil Arfaoui 2025-01-09 21:13:35 +01:00
parent e940d966e4
commit b1324c53ee

View file

@ -33,7 +33,9 @@ const socialImageRes = await getImage({
width: 1200, width: 1200,
height: 600, height: 600,
}); });
const socialImage = (Astro.url.origin + structuredData.image?.src.toString()) || Astro.url.origin + socialImageRes.src; // Get the full URL of the image (https://stackoverflow.com/a/9858694) const socialImage = structuredData?.image?.src
? (Astro.url.origin + structuredData.image.src)
: Astro.url.origin + socialImageRes.src; // Get the full URL of the image (https://stackoverflow.com/a/9858694)
const languages: { [key: string]: string } = { const languages: { [key: string]: string } = {
en: "", en: "",