My personal website.
1import rss from "@astrojs/rss";
2import { getCollection } from "astro:content";
3
4export async function GET(context) {
5 const blog = await getCollection("blog");
6 return rss({
7 title: "ENTOMOVISCERA.ONLINE",
8 description: "WARNING: Bug inside.",
9 site: context.site,
10 items: blog.map((post) => ({
11 title: post.data.title,
12 description: post.data.bio,
13 pubDate: post.data.pub,
14 link: `/blog/${post.id}/`,
15 })),
16 });
17}