mirror of
https://github.com/KazooTTT/kazoottt-blog.git
synced 2025-06-23 02:31:33 +08:00
feat: show the socialImage
This commit is contained in:
@ -13,26 +13,20 @@ interface Props {
|
||||
|
||||
const {
|
||||
content: { data, render },
|
||||
simple = false
|
||||
simple = false,
|
||||
socialImage
|
||||
} = Astro.props
|
||||
const { remarkPluginFrontmatter } = await render()
|
||||
|
||||
console.log('data.date_modified', data.date_modified)
|
||||
---
|
||||
|
||||
<!-- {
|
||||
{
|
||||
socialImage && (
|
||||
<div class='mb-6'>
|
||||
<img
|
||||
src={socialImage}
|
||||
class='rounded-2xl object-cover'
|
||||
fetchpriority='high'
|
||||
loading='eager'
|
||||
/>
|
||||
<img src={socialImage} class='rounded-2xl object-cover' loading='eager' />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
-->
|
||||
|
||||
<div class='flex flex-wrap items-center gap-x-3 gap-y-2'>
|
||||
<p class='text-xs'>
|
||||
<FormattedDate date={data.date} /> /{' '}
|
||||
|
@ -19,7 +19,7 @@ const {
|
||||
slug
|
||||
} = post
|
||||
|
||||
const socialImage = ogImage ? ogImage : `/og-image/${slug}.png`
|
||||
const socialImage = ogImage ? ogImage : undefined
|
||||
const articleDate = date?.toISOString()
|
||||
const { headings } = await post.render()
|
||||
---
|
||||
|
Reference in New Issue
Block a user