feat: update rss config

This commit is contained in:
KazooTTT
2025-02-24 14:19:48 +08:00
parent c037d61e49
commit e2e98f9cc7
4 changed files with 25 additions and 7 deletions

View File

@ -15,13 +15,16 @@ export const GET = async () => {
<feedId>116728239358236672</feedId> <feedId>116728239358236672</feedId>
<userId>62156866798228480</userId> <userId>62156866798228480</userId>
</follow_challenge>`, </follow_challenge>`,
title: siteConfig.title, title: siteConfig.rssConfig.noteTitle,
description: siteConfig.description, description: siteConfig.rssConfig.noteDescription,
site: import.meta.env.SITE, site: import.meta.env.SITE,
items: sortedNotes.map((post) => { items: sortedNotes.map((post) => {
const tagStr = post.data.tags.reduce((acc, tag) => {
return `${acc}#${tag} `;
}, "");
return { return {
title: post.data.title, title: post.data.title,
description: post.data.description ?? "", description: (post.data.description ?? "") + "\t" + tagStr,
pubDate: post.data.date, pubDate: post.data.date,
link: `notes/${post.id}/`, link: `notes/${post.id}/`,
content: post.body content: post.body

View File

@ -15,13 +15,16 @@ export const GET = async () => {
<feedId>75113012474671104</feedId> <feedId>75113012474671104</feedId>
<userId>62156866798228480</userId> <userId>62156866798228480</userId>
</follow_challenge>`, </follow_challenge>`,
title: siteConfig.title, title: siteConfig.rssConfig.blogTitle,
description: siteConfig.description, description: siteConfig.rssConfig.blogDescription,
site: import.meta.env.SITE, site: import.meta.env.SITE,
items: sortedPosts.map((post) => { items: sortedPosts.map((post) => {
const tagStr = post.data.tags.reduce((acc, tag) => {
return `${acc}#${tag} `;
}, "");
return { return {
title: post.data.title, title: post.data.category ? `[${post.data.category}] ${post.data.title}` : post.data.title,
description: post.data.description ?? "", description: (post.data.description ?? "") + "\t" + tagStr,
pubDate: post.data.date, pubDate: post.data.date,
link: `posts/${post.id}/`, link: `posts/${post.id}/`,
content: post.body content: post.body

View File

@ -23,6 +23,12 @@ export const siteConfig: SiteConfig = {
title: "声控烤箱 KazooTTT 博客", title: "声控烤箱 KazooTTT 博客",
// ! Please remember to replace the following site property with your own domain, used in astro.config.ts // ! Please remember to replace the following site property with your own domain, used in astro.config.ts
url: "https://blog.kazoottt.top/", url: "https://blog.kazoottt.top/",
rssConfig: {
noteTitle: "碎碎念 - 声控烤箱 KazooTTT",
noteDescription: "分享一些比较碎片化的内容。",
blogTitle: "博客 - 声控烤箱 KazooTTT",
blogDescription: "分享一些技术笔记、个人随笔、生活日常等比较长篇的内容。",
},
}; };
// Used to generate links in both the Header & Footer. // Used to generate links in both the Header & Footer.

View File

@ -9,6 +9,12 @@ export interface SiteConfig {
ogLocale: string; ogLocale: string;
title: string; title: string;
url: string; url: string;
rssConfig: {
noteTitle: string;
noteDescription: string;
blogTitle: string;
blogDescription: string;
};
} }
export interface PaginationLink { export interface PaginationLink {