--- import Layout from '../../layouts/Layout.astro'; import { getCollection } from 'astro:content'; const posts = await getCollection('blog'); const sortedPosts = posts.sort((a, b) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf() ); ---
{sortedPosts.map((post) => (

{post.data.title}

{post.data.description}

))}