From ca8e6824eaa711105f4092365792720c9dde026b Mon Sep 17 00:00:00 2001 From: Joe Carstairs Date: Thu, 18 Jun 2026 19:21:59 +0100 Subject: remove Astro website --- website/src/pages/blog/rss.xml.ts | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 website/src/pages/blog/rss.xml.ts (limited to 'website/src/pages/blog/rss.xml.ts') diff --git a/website/src/pages/blog/rss.xml.ts b/website/src/pages/blog/rss.xml.ts deleted file mode 100644 index 5b90fd0..0000000 --- a/website/src/pages/blog/rss.xml.ts +++ /dev/null @@ -1,37 +0,0 @@ -import path from 'node:path'; -import rss from '@astrojs/rss'; -import type { APIContext } from 'astro'; -import { getCollection } from 'astro:content'; -import MarkdownIt from 'markdown-it'; - -const mdParser = new MarkdownIt({ - html: true -}); - -export async function GET(context: APIContext) { - // `site` is guaranteed to exist because we define it in our Astro config - const site = context.site!; - const posts = await getCollection('blog'); - - return rss({ - title: 'Joe Carstairs’ blog', - description: 'Short posts on random topics I find interesting', - customData: ` - /images/headshot.webp - en-GB - `, - site: path.join(site.toString(), 'blog'), - trailingSlash: false, - items: posts.map((post) => ({ - link: `/blog/${post.id}`, - title: post.data.title, - content: mdParser.render(post.body ?? ''), - pubDate: post.data.pubDate, - description: post.data.description, - author: 'Joe Carstairs', - - // A page for displaying comments related to the item - /* commentsUrl: `${post.slug}/comments`, */ - })), - }) -} -- cgit v1.2.3