2026-03-02T08-42-04_auto_memory/memories.db-wal
This commit is contained in:
parent
13a55b1df5
commit
13ff2229f3
23
chatgpt-to-claude/src/pages/rss.xml.ts
Normal file
23
chatgpt-to-claude/src/pages/rss.xml.ts
Normal file
@ -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}/`,
|
||||
})),
|
||||
});
|
||||
}
|
||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user