fix: remove inline cover image to avoid duplication with OG image

The frontmatter image field is now used only for Open Graph meta tags.
The ImageWrapper that rendered it as an inline hero was removed to
prevent the same image appearing twice (once as OG card, once in content).
The dashed divider now always shows below post metadata.
This commit is contained in:
星月 2026-04-15 14:36:10 +08:00
parent b6aa519698
commit 3858e2f2b3

View File

@ -93,14 +93,10 @@ const jsonLd = {
tags={entry.data.tags}
category={entry.data.category}
></PostMetadata>
{!entry.data.image && <div class="border-[var(--line-divider)] border-dashed border-b-[1px] mb-5"></div>}
<div class="border-[var(--line-divider)] border-dashed border-b-[1px] mb-5"></div>
</div>
<!-- always show cover as long as it has one -->
{entry.data.image &&
<ImageWrapper id="post-cover" src={entry.data.image} basePath={path.join("content/posts/", getDir(entry.id))} class="mb-8 rounded-xl banner-container onload-animation"/>
}
<!-- cover image is used as OG image only; no longer rendered inline to avoid duplication -->
<Markdown class="mb-6 markdown-content onload-animation">