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

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

View File

@ -49,7 +49,7 @@ export default defineConfig({
],
}),
uploader({
paths: ['images', 'og', 'cats'],
paths: ['images'],
endpoint: process.env.S3_ENDPOINT,
bucket: process.env.S3_BUCKET as string,
accessKey: process.env.S3_ACCESS_KEY as string,

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">