blob: a509386ff5cf00f7796bf3a9b308e5fefcbcdd49 (
plain) (
blame)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
 | import { getCollection } from "astro:content";
import rss from "@astrojs/rss";
export async function GET(context) {
	const posts = await getCollection("blog");
	return rss({
		customData: `<language>ru-ru</language>`,
		description: "Tech insights and coding best practices from an OpenSource enthusiast and ethical hacker.",
		items: posts.map((post) => ({
			customData: post.data.customData,
			description: post.data.description,
			link: `/blog/${post.slug}`,
			pubDate: post.data.pubDate,
			title: post.data.title,
		})),
		site: context.site,
		title: "Valentin Popov’s Technology Blog",
	});
}
 |