feat: initial commit
This commit is contained in:
commit
662a249ad3
192 changed files with 24641 additions and 0 deletions
23
src/pages/feeds/all.xml.js
Normal file
23
src/pages/feeds/all.xml.js
Normal file
|
@ -0,0 +1,23 @@
|
|||
import rss from "@astrojs/rss";
|
||||
import { fetchGlobals } from "@utils/data/globals.js";
|
||||
import { fetchActivity } from "@utils/data/activity.js";
|
||||
|
||||
export const prerender = true;
|
||||
|
||||
export async function GET() {
|
||||
const globals = await fetchGlobals();
|
||||
const activity = await fetchActivity();
|
||||
|
||||
return rss({
|
||||
title: "coryd.dev activity feed",
|
||||
description: "The latest activity from Cory Dransfeldt.",
|
||||
site: globals.url,
|
||||
stylesheet: `${globals.url}/feeds/style.xsl`,
|
||||
items: activity.map((item) => ({
|
||||
title: item.feed.title,
|
||||
pubDate: item.feed.date,
|
||||
link: item.feed.url,
|
||||
description: item.feed.description,
|
||||
})),
|
||||
});
|
||||
}
|
Reference in a new issue