From 18c88196abae7eee302a38a41b6bd631b6d3022b Mon Sep 17 00:00:00 2001 From: Heather Yu <35639529+hetd54@users.noreply.github.com> Date: Wed, 24 Apr 2024 15:33:47 -0400 Subject: [PATCH] fix: display news as most recent first --- src/pages/news/index.astro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/news/index.astro b/src/pages/news/index.astro index 1c58591..7c41335 100644 --- a/src/pages/news/index.astro +++ b/src/pages/news/index.astro @@ -4,7 +4,7 @@ import Layout from "../../layouts/Layout.astro" import FormattedDate from "../../components/FormattedDate.astro" const posts = (await getCollection("news")).sort( - (a, b) => a.data.pubDate.valueOf() - b.data.pubDate.valueOf() + (a, b) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf() ) ---