Skip to content

Commit

Permalink
fix: og image src
Browse files Browse the repository at this point in the history
related to: 3e0109c
  • Loading branch information
tanishqmanuja authored and satnaing committed Sep 25, 2023
1 parent d10e8df commit 6dffcf3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/layouts/PostDetails.astro
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6dffcf3

Please sign in to comment.