diff --git a/src/pages/blog/rss.xml.js b/src/pages/blog/rss.xml.js index 1a3209b..e466ebe 100644 --- a/src/pages/blog/rss.xml.js +++ b/src/pages/blog/rss.xml.js @@ -1,8 +1,10 @@ import rss from "@astrojs/rss"; import { getCollection } from "astro:content"; +import dayjs from "dayjs"; export async function GET(context) { const Blog = await getCollection("blog"); + Blog.sort((a, b) => dayjs(b.data.published).diff(dayjs(a.data.published))); return rss({ title: "Hack13 Ramblings", description: "A fox with a blog, that rambles about tech, games, and life.",