Skip to content

Commit ebdbe7a

Browse files
committed
pages/feed.xml.js: sort posts by date descending
1 parent 7c1dbd7 commit ebdbe7a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/pages/feed.xml.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ import { createSafeMarkdown } from "@/utils/safeMarkdown";
66
const safeMarkdown = createSafeMarkdown();
77

88
export async function GET(context) {
9-
const blog = await getCollection("blog");
9+
const blog = (await getCollection("blog")).sort((a, b) =>
10+
b.id.localeCompare(a.id),
11+
);
1012
return rss({
1113
title: "Monero",
1214
description: "Monero Blog RSS Feed",

0 commit comments

Comments
 (0)