mirror of
https://github.com/valentineus/popov.link.git
synced 2025-07-04 16:40:26 +03:00
chore: remove unused environment variables and update layout components
- Deleted the .env and src/env.d.ts files as they are no longer needed. - Updated BaseLayout to require title and description props directly, ensuring better clarity in component usage. - Adjusted various pages to pass explicit title and description values, enhancing SEO and user experience. - Increased print width in .prettierrc.mjs for improved code formatting.
This commit is contained in:
@ -2,13 +2,16 @@ 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>ru-ru</language>`,
|
||||
description: import.meta.env.DEFAULT_DESCRIPTION,
|
||||
description: description,
|
||||
items: posts.map((post) => ({
|
||||
customData: post.data.customData,
|
||||
description: post.data.description,
|
||||
@ -17,6 +20,6 @@ export async function GET(context) {
|
||||
title: post.data.title,
|
||||
})),
|
||||
site: context.site,
|
||||
title: import.meta.env.DEFAULT_TITLE,
|
||||
title: title,
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user