Skip to content

Commit

Permalink
fix: display news as most recent first
Browse files Browse the repository at this point in the history
  • Loading branch information
hetd54 committed Apr 24, 2024
1 parent fd202eb commit 18c8819
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/news/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -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()
)
---

Expand Down

0 comments on commit 18c8819

Please sign in to comment.