We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6e0f0a5 commit 9cda1abCopy full SHA for 9cda1ab
1 file changed
src/pages/rss.xml.js
@@ -5,12 +5,16 @@ export async function GET(context) {
5
import.meta.glob('./blog/*.{md,mdx}')
6
);
7
8
- console.log(originalItems)
9
10
- const itemsWithAuthor = originalItems.map((item) => ({
11
- ...item,
12
- author: 'Andrew Moses',
13
- }));
+ const itemsWithAuthor = originalItems
+ .map((item) => ({
+ ...item,
+ author: 'Andrew Moses',
+ }))
14
+ .sort(
15
+ (a, b) =>
16
+ new Date(b.pubDate) - new Date(a.pubDate)
17
+ );
18
19
return rss({
20
title: 'Andrew Moses',
0 commit comments