mirror of
https://github.com/ChenQihan666/MyBlog-Next.git
synced 2026-08-14 11:29:33 +08:00
fix: update auto-gen OG images to allow special char usage in title
Update the implementation of og image generation code to allow special character usage in title. fix #103, fix #88
This commit is contained in:
@@ -18,7 +18,7 @@ const { title, author, description, ogImage, canonicalURL, pubDatetime, tags } =
|
||||
|
||||
const { Content } = await post.render();
|
||||
|
||||
const ogUrl = new URL(ogImage ? ogImage : `${title}.png`, Astro.url.origin)
|
||||
const ogUrl = new URL(ogImage ? ogImage : `${post.slug}.png`, Astro.url.origin)
|
||||
.href;
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user