mirror of
https://github.com/valentineus/popov.link.git
synced 2025-10-24 18:14:06 +03:00
21 lines
608 B
JavaScript
21 lines
608 B
JavaScript
|
|
import rss from "@astrojs/rss";
|
|||
|
|
import { getCollection } from "astro:content";
|
|||
|
|
|
|||
|
|
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",
|
|||
|
|
});
|
|||
|
|
}
|