fix: og image src

related to: 3e0109c12e708351df60df7b938e8bcc07807540
This commit is contained in:
tanishqmanuja
2023-09-20 15:02:10 +05:30
committed by Sat Naing
parent d10e8dfb78
commit 6dffcf3cb3
+4 -2
View File
@@ -18,8 +18,10 @@ const { title, author, description, ogImage, canonicalURL, pubDatetime, tags } =
const { Content } = await post.render();
const ogUrl = new URL(ogImage ? ogImage : `${post.slug}.png`, Astro.url.origin)
.href;
const ogUrl = new URL(
ogImage ? ogImage.src : `${post.slug}.png`,
Astro.url.origin
).href;
---
<Layout