fix: correctly correspond to the og of each article

This commit is contained in:
radishzzz 2025-03-13 01:21:19 +00:00
parent 66d055f512
commit 9b9bdb2811
6 changed files with 39 additions and 32 deletions

View file

@ -18,9 +18,10 @@ import '@/styles/heti.css'
interface Props {
postTitle?: string
postDescription?: string
postSlug?: string
}
const { postTitle, postDescription } = Astro.props
const { postTitle, postDescription, postSlug } = Astro.props
const { isHome, isPost } = getPagePath(Astro.url.pathname)
const fontStyle = themeConfig.global.fontStyle === 'serif' ? 'font-serif' : 'font-sans'
@ -34,7 +35,7 @@ const footerMarginClass = isPost && themeConfig.comment?.waline?.serverURL
class={fontStyle}
data-overlayscrollbars-initialize
>
<Head {postTitle} {postDescription} />
<Head {postTitle} {postDescription} {postSlug} />
<body data-overlayscrollbars-initialize>
<!-- -->
<div