update
This commit is contained in:
@@ -1,23 +1,21 @@
|
||||
import { Feed } from "feed";
|
||||
|
||||
const basePath = "https://blog.rhen.cloud";
|
||||
import siteConfig from "~/config";
|
||||
|
||||
export default defineEventHandler(async (event) => {
|
||||
setHeader(event, "content-type", "text/xml");
|
||||
const docs = await queryCollection(event, "content").all();
|
||||
const feed = new Feed({
|
||||
title: "RhenCloud's Blog",
|
||||
description:
|
||||
"Welcome To My Blog Site. Get Web Development, Javascript, Typescript, NodeJs, Vue, and Nuxt, Related Articles, Tips, Learning resources and more.",
|
||||
id: basePath,
|
||||
link: basePath,
|
||||
language: "zh-CN",
|
||||
favicon: `${basePath}/favicon.ico`,
|
||||
title: siteConfig.siteMeta.title,
|
||||
description: siteConfig.siteMeta.description,
|
||||
id: siteConfig.siteMeta.url,
|
||||
link: siteConfig.siteMeta.url,
|
||||
language: siteConfig.siteMeta.lang,
|
||||
favicon: `${siteConfig.siteMeta.url}/${siteConfig.siteMeta.favicon}`,
|
||||
copyright: "MIT",
|
||||
author: {
|
||||
name: "RhenCloud",
|
||||
email: "i@rhen.cloud",
|
||||
link: basePath,
|
||||
name: siteConfig.siteMeta.author,
|
||||
email: siteConfig.siteMeta.email,
|
||||
link: siteConfig.siteMeta.url,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -26,8 +24,8 @@ export default defineEventHandler(async (event) => {
|
||||
// console.log(doc)
|
||||
feed.addItem({
|
||||
title: doc.title || "",
|
||||
id: basePath + doc.path,
|
||||
link: basePath + doc.path,
|
||||
id: siteConfig.siteMeta.url + "/" + doc.path,
|
||||
link: siteConfig.siteMeta.url + "/" + doc.path,
|
||||
description: doc.description,
|
||||
content: doc.description,
|
||||
date: new Date(doc.meta?.date as string),
|
||||
|
||||
Reference in New Issue
Block a user