rsshub
Version:
Make RSS Great Again!
30 lines (29 loc) • 856 B
JavaScript
import { t as rofetch } from "./ofetch-W1aeTHCo.mjs";
import { t as parseDate } from "./parse-date-CjhZE69i.mjs";
import markdownit from "markdown-it";
//#region lib/routes/simpread/notice.ts
const md = markdownit();
const route = {
path: "/notice",
categories: ["program-update"],
example: "/simpread/notice",
name: "消息通知",
maintainers: ["zytomorrow"],
handler
};
async function handler() {
return {
title: "SimpRead 消息通知",
link: "https://simpread.pro/changelog.html",
description: "SimpRead 消息通知",
item: (await rofetch("https://static.simp.red/notice")).notice.map((item) => ({
description: md.render(item.content),
link: "https://simpread.pro/changelog.html",
pubDate: parseDate(item.date),
title: `${item.category.name}-${item.title}`,
author: "SimpRead"
}))
};
}
//#endregion
export { route };