diff --git a/chatgpt-to-claude/src/pages/rss.xml.ts b/chatgpt-to-claude/src/pages/rss.xml.ts new file mode 100644 index 000000000..34684aea8 --- /dev/null +++ b/chatgpt-to-claude/src/pages/rss.xml.ts @@ -0,0 +1,23 @@ +import rss from "@astrojs/rss"; +import { getCollection } from "astro:content"; +import { SITE_TITLE, SITE_DESCRIPTION, SITE_URL } from "@/consts"; +import type { APIContext } from "astro"; + +export const prerender = true; + +export async function GET(context: APIContext) { + const posts = await getCollection("blog"); + return rss({ + title: SITE_TITLE, + description: SITE_DESCRIPTION, + site: context.site ?? SITE_URL, + items: posts + .sort((a, b) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf()) + .map((post) => ({ + title: post.data.title, + pubDate: post.data.pubDate, + description: post.data.description, + link: `/blog/${post.id}/`, + })), + }); +} diff --git a/memory/memories.db-wal b/memory/memories.db-wal index 381d98d9e..79fc66cdc 100644 Binary files a/memory/memories.db-wal and b/memory/memories.db-wal differ