update content

This commit is contained in:
ryanchristo 2026-11-20 08:33:43 -08:00
parent d22eb07a55
commit 339a4cb482
No known key found for this signature in database
16 changed files with 166 additions and 264 deletions

View file

@ -1,41 +0,0 @@
import { Feed } from "feed";
import { getArtifacts } from "utils";
const SITE_URL = "https://chora.io/artifacts/essays";
function getAllArtifacts() {
return [
...getArtifacts('essays'),
]
}
export const revalidate = false;
export async function GET() {
const feed = new Feed({
title: "ryan's artifacts (essays)",
description: "ryan's artifacts (essays)",
id: SITE_URL,
link: SITE_URL,
language: "en",
feedLinks: { rss2: `${SITE_URL}/feed` },
ttl: 60,
});
for (const a of getAllArtifacts()) {
feed.addItem({
title: a.title,
id: `${SITE_URL}/${a.id}`,
link: `${SITE_URL}/${a.id}`,
description: a.description,
date: a.created,
});
}
return new Response(feed.rss2(), {
headers: {
"Content-Type": "application/rss+xml; charset=utf-8",
"Cache-Control": "public, max-age=3600",
},
});
}