This commit is contained in:
@@ -15,20 +15,25 @@ export async function GET(context: { site?: URL }) {
|
||||
description: entry.data.description,
|
||||
pubDate: entry.data.published,
|
||||
link: `/stories/${entry.id}`,
|
||||
editorialOrder: entry.data.editorialOrder,
|
||||
})),
|
||||
...briefings.map((entry) => ({
|
||||
title: entry.data.title,
|
||||
description: entry.data.description,
|
||||
pubDate: entry.data.published,
|
||||
link: `/briefing/${entry.id}`,
|
||||
editorialOrder: 1_000,
|
||||
})),
|
||||
...episodes.map((entry) => ({
|
||||
title: entry.data.title,
|
||||
description: entry.data.description,
|
||||
pubDate: entry.data.published,
|
||||
link: `/podcast/${entry.id}`,
|
||||
editorialOrder: 1_000,
|
||||
})),
|
||||
].sort((a, b) => b.pubDate.valueOf() - a.pubDate.valueOf());
|
||||
]
|
||||
.sort((a, b) => b.pubDate.valueOf() - a.pubDate.valueOf() || a.editorialOrder - b.editorialOrder)
|
||||
.map(({ editorialOrder: _editorialOrder, ...item }) => item);
|
||||
|
||||
return rss({
|
||||
title: `${site.title} ${site.qualifier}`,
|
||||
|
||||
Reference in New Issue
Block a user