refactor: change the og image url for unfied the access routing.
This commit is contained in:
parent
a44f8ca0e5
commit
52dd541c5b
@ -49,7 +49,7 @@ export default defineConfig({
|
|||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
uploader({
|
uploader({
|
||||||
paths: ['images', 'og', 'cats'],
|
paths: ['images', 'assets'],
|
||||||
endpoint: process.env.S3_ENDPOINT,
|
endpoint: process.env.S3_ENDPOINT,
|
||||||
bucket: process.env.S3_BUCKET as string,
|
bucket: process.env.S3_BUCKET as string,
|
||||||
accessKey: process.env.S3_ACCESS_KEY as string,
|
accessKey: process.env.S3_ACCESS_KEY as string,
|
||||||
@ -76,7 +76,7 @@ export default defineConfig({
|
|||||||
optimizeDeps: { exclude: ['@napi-rs/canvas', 'opendal', 'sharp'] },
|
optimizeDeps: { exclude: ['@napi-rs/canvas', 'opendal', 'sharp'] },
|
||||||
},
|
},
|
||||||
build: {
|
build: {
|
||||||
assets: 'cats',
|
assets: 'assets',
|
||||||
assetsPrefix: options.assetsPrefix(),
|
assetsPrefix: options.assetsPrefix(),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -21,7 +21,7 @@ const { Content, headings } = await page.render();
|
|||||||
---
|
---
|
||||||
|
|
||||||
<BaseLayout title={page.title} description={page.summary} footer={false}>
|
<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="row gx-0">
|
||||||
<div class="col-lg-8 col-xl-8">
|
<div class="col-lg-8 col-xl-8">
|
||||||
|
@ -28,7 +28,7 @@ const { Content, headings } = await post.render();
|
|||||||
description={post.summary}
|
description={post.summary}
|
||||||
publishDate={post.date.toISOString()}
|
publishDate={post.date.toISOString()}
|
||||||
requestPath={post.permalink}
|
requestPath={post.permalink}
|
||||||
ogImageUrl={`/og/${post.slug}.png`}
|
ogImageUrl={`/images/og/${post.slug}.png`}
|
||||||
ogImageAltText={`${post.title} - ${post.summary}`}
|
ogImageAltText={`${post.title} - ${post.summary}`}
|
||||||
/>
|
/>
|
||||||
<div class="px-lg-2 px-xxl-5 py-3 py-md-4 py-xxl-5">
|
<div class="px-lg-2 px-xxl-5 py-3 py-md-4 py-xxl-5">
|
||||||
|
Loading…
Reference in New Issue
Block a user