diff --git a/src/pages/rss.xml.ts b/src/pages/rss.xml.ts index c827107..940410e 100644 --- a/src/pages/rss.xml.ts +++ b/src/pages/rss.xml.ts @@ -1,13 +1,14 @@ import { SITE_DESCRIPTION, SITE_TITLE } from "@/consts"; import rss from "@astrojs/rss"; +import type { APIContext } from "astro"; import { getCollection } from "astro:content"; -export async function GET(context) { +export async function GET(context: APIContext) { const posts = await getCollection("blog"); return rss({ title: SITE_TITLE, description: SITE_DESCRIPTION, - site: context.site, + site: context.site!, items: posts.map((post) => ({ ...post.data, link: `/blog/${post.slug}/`,