--- import Layout from '../../layouts/Layout.astro'; import { getCollection } from 'astro:content'; export async function getStaticPaths() { const posts = await getCollection('blog'); return posts.map((post) => ({ params: { slug: post.id.replace('.md', '') }, props: { post }, })); } const { post } = Astro.props; ---
{post.data.tags.map((tag) => ( {tag} ))}

{post.data.title}

✍️ {post.data.author} 📅 {post.data.pubDate.toLocaleDateString('th-TH', { year: 'numeric', month: 'long', day: 'numeric' })}