Fix blog feature image: use heroImage from frontmatter instead of hardcode

This commit is contained in:
Kunthawat Greethong
2026-07-01 10:24:47 +07:00
parent 54c9b381b9
commit 236edb5f9f
2 changed files with 2 additions and 7 deletions

View File

@@ -138,11 +138,7 @@ const faqPageJsonLd = faqPairs.length > 0
</header>
<div class="blog-feature-image">
{['ai-for-sme-start-with-pain', 'marketing-automation-reduce-work', 'sme-website-next-action'].includes(post.id) ? (
<img src={`/images/blog-${post.id === 'ai-for-sme-start-with-pain' ? 'ai' : post.id === 'marketing-automation-reduce-work' ? 'automation' : 'website'}.jpg`} alt={post.data.title} />
) : (
<img src="/images/blog-marketing.jpg" alt={post.data.title} />
)}
<img src={post.data.heroImage || '/images/blog-placeholder.svg'} alt={post.data.title} />
</div>
<div class="blog-article-shell">