From 640097c072eedd22f29b10c4d70a079b94512a7e Mon Sep 17 00:00:00 2001 From: Quinn Hegeman <102350242+itsfinniii@users.noreply.github.com> Date: Sat, 7 Mar 2026 21:12:33 +0100 Subject: [PATCH] Create RSS feed base --- astro/src/pages/rss.xml.ts | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 astro/src/pages/rss.xml.ts diff --git a/astro/src/pages/rss.xml.ts b/astro/src/pages/rss.xml.ts new file mode 100644 index 0000000..b175cc9 --- /dev/null +++ b/astro/src/pages/rss.xml.ts @@ -0,0 +1,27 @@ +import { getSettings } from "@/content/settings/settings"; +import type { APIRoute } from "astro"; +import minifyXML from "minify-xml"; + +export const GET = (async () => { + const settings = await getSettings(); + + let sitemapContent = ` + + + + ${settings.website.applicationName} + This is the RSS feed of ${settings.website.applicationName} + ${settings.website.domainName} + Sat, 13 Dec 2003 18:30:02 GMT + + + `; + + return new Response(minifyXML(sitemapContent), { + status: 200, + statusText: "OK", + headers: { + "Content-Type": "application/xml" + } + }); +}) satisfies APIRoute;