--- import Base from '../../layouts/Base.astro'; import PageHero from '../../components/PageHero.astro'; import BentoGrid from '../../components/BentoGrid.astro'; import BentoTile from '../../components/BentoTile.astro'; import DecoOrb from '../../components/DecoOrb.astro'; import { getCollection } from 'astro:content'; const blogPosts = await getCollection('blog'); const sortedPosts = blogPosts.sort((a, b) => b.data.date.valueOf() - a.data.date.valueOf()); // Surface color rotation for variety across the post grid const surfaces = ['white', 'soft', 'yellow', 'mint', 'purple-soft', 'teal'] as const; function surfaceFor(i: number) { return surfaces[i % surfaces.length]; } --- {sortedPosts.length > 0 && ( )}
บทความทั้งหมด

บทความ ล่าสุด

{sortedPosts.length > 1 && ( {sortedPosts.slice(1).map((post, i) => (
{post.data.image && (
{post.data.title}
)}

{post.data.excerpt}

))}
)}

ต้องการความช่วยเหลือ?

ปรึกษาฟรี! เราพร้อมช่วยวิเคราะห์และให้คำแนะนำ