0
mirror of https://github.com/valentineus/popov.link.git synced 2025-07-04 00:20:26 +03:00
Files
popov.link/src/pages/feed.xml.js
Valentin Popov 16fa8a3b5d feat: enhance accessibility and language support across components
- Updated various components to include `lang` attributes for improved accessibility and SEO.
- Introduced a new `env.d.ts` file to define environment variables for better type safety.
- Adjusted the print width in `.prettierrc.mjs` for improved code formatting.
- Streamlined the `Header`, `PostElement`, and `SocialLinks` components for better structure and clarity.
- Added language support to blog posts and updated the layout to reflect these changes.
2025-06-11 17:49:14 +00:00

26 lines
671 B
JavaScript

import { getCollection } from "astro:content";
import rss from "@astrojs/rss";
export async function GET(context) {
const title = "RSS Feed | Valentin Popov Blog";
const description = "Follow the latest posts from Valentin Popov via RSS.";
const posts = await getCollection("blog", ({ data }) => {
return data.draft !== true;
});
return rss({
customData: `<language>en</language>`,
description: description,
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: title,
});
}