refactor: change the og image url for unfied the access routing.

This commit is contained in:
Yufan Sheng 2024-11-29 12:35:16 +08:00
parent a44f8ca0e5
commit f3b1c0da15
Signed by: syhily
GPG Key ID: 9D18A22A7DCD5A9B
3 changed files with 2 additions and 2 deletions

View File

@ -21,7 +21,7 @@ const { Content, headings } = await page.render();
---
<BaseLayout title={page.title} description={page.summary} footer={false}>
<PageMeta slot="og" title={page.title} description={page.summary} ogImageUrl={`/og/${page.slug}.png`} />
<PageMeta slot="og" title={page.title} description={page.summary} ogImageUrl={`/images/og/${page.slug}.png`} />
<div class="row gx-0">
<div class="col-lg-8 col-xl-8">

View File

@ -28,7 +28,7 @@ const { Content, headings } = await post.render();
description={post.summary}
publishDate={post.date.toISOString()}
requestPath={post.permalink}
ogImageUrl={`/og/${post.slug}.png`}
ogImageUrl={`/images/og/${post.slug}.png`}
ogImageAltText={`${post.title} - ${post.summary}`}
/>
<div class="px-lg-2 px-xxl-5 py-3 py-md-4 py-xxl-5">