--- import type { CollectionEntry } from 'astro:content'; interface Props { post: CollectionEntry<'blog'>; } const { post } = Astro.props; const { title, excerpt, date, author, category, categories, image, featuredImage } = post.data; // Support both 'category' and 'categories' field names const postCategory = category || (Array.isArray(categories) ? categories[0] : 'ทั่วไป'); // Support both 'image' and 'featuredImage' field names const postImage = image || featuredImage || '/images/2021/03/ppr-pipe_000C.jpg'; ---
{title}
{postCategory}

{title}

{excerpt && (

{excerpt}

)}
อ่านต่อ