feat: initial commit

This commit is contained in:
Cory Dransfeldt 2024-11-16 16:43:07 -08:00
commit 0ff7457679
No known key found for this signature in database
192 changed files with 24379 additions and 0 deletions

View file

@ -0,0 +1,24 @@
import rss from "@astrojs/rss";
import { fetchGlobals } from "@utils/data/globals.js";
import { fetchLinks } from "@utils/data/links.js";
export const prerender = true;
export async function GET() {
const globals = await fetchGlobals();
const links = await fetchLinks();
return rss({
title: "coryd.dev links feed",
description:
"These are links I've liked or otherwise found interesting. They're all added manually, after having been read and, I suppose, properly considered.",
site: globals.url,
stylesheet: `${globals.url}/feeds/style.xsl`,
items: links.slice(0, 20).map((link) => ({
title: link.feed.title,
pubDate: link.feed.date,
link: link.feed.url,
description: link.feed.description,
})),
});
}