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;