mirror of
https://github.com/ChenQihan666/MyBlog-Next.git
synced 2026-08-14 19:41:02 +08:00
fix: og image src
related to: 3e0109c12e708351df60df7b938e8bcc07807540
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user