From 4eec3f6b2b112974654cc6d9da90e949a27764e6 Mon Sep 17 00:00:00 2001 From: Tony Date: Sat, 6 Apr 2024 01:28:55 +0800 Subject: [PATCH] fix(route): rsshub new docs link (#15123) --- lib/routes/rsshub/routes.ts | 10 +--------- lib/types.ts | 1 + 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/lib/routes/rsshub/routes.ts b/lib/routes/rsshub/routes.ts index 0f09cc6bf..26e4cb9af 100644 --- a/lib/routes/rsshub/routes.ts +++ b/lib/routes/rsshub/routes.ts @@ -7,14 +7,6 @@ export const route: Route = { categories: ['program-update'], example: '/rsshub/routes/en', parameters: { lang: 'Language, `zh` means Chinese docs, other values or null means English docs, `en` by default' }, - features: { - requireConfig: false, - requirePuppeteer: false, - antiCrawler: false, - supportBT: false, - supportPodcast: false, - supportScihub: false, - }, radar: [ { source: ['docs.rsshub.app/*'], @@ -83,7 +75,7 @@ async function handler(ctx) { return { title: `${h2Title.text().trim()} - ${h3Title.text().trim()}`, description: item.html(), - link: `https://docs.rsshub.app/${lang}routes/${type}#${encodeURIComponent(h2Title.find('.hash-link').attr('href') && h3Title.find('.hash-link').attr('href')?.substring(1))}`, + link: `https://docs.rsshub.app/${lang}routes/${type}#${encodeURIComponent(h2Title.find('.header-anchor').attr('href') && h3Title.find('.header-anchor').attr('href')?.substring(1))}`, guid: item.attr('id'), }; }), diff --git a/lib/types.ts b/lib/types.ts index f192da75c..a45dc6537 100644 --- a/lib/types.ts +++ b/lib/types.ts @@ -1,6 +1,7 @@ import type { Context } from 'hono'; // Make sure it's synchronise with scripts/workflow/data.ts +// and lib/routes/rsshub/routes.ts type Category = | 'social-media' | 'new-media'