--- import PageLayout from "../../layouts/PageLayout.astro"; import { getCollection } from "astro:content"; import Date from "../../components/Date.astro"; const allArticles = await getCollection("blog"); const sortedArticles = allArticles.sort((a, b) => { return b.data.pubDate.valueOf() - a.data.pubDate.valueOf(); }); ---
{ sortedArticles.map(({ id, data: { title, pubDate, description } }) => (
{title}

{description}

)) }