Fixing RSS feed to be in proper order
This commit is contained in:
parent
6773a5be12
commit
3706a8dac2
1 changed files with 2 additions and 0 deletions
|
@ -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.",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue