fix(route): rsshub new docs link (#15123)

This commit is contained in:
Tony
2024-04-06 01:28:55 +08:00
committed by GitHub
parent c943f67640
commit 4eec3f6b2b
2 changed files with 2 additions and 9 deletions
+1 -9
View File
@@ -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'),
};
}),
+1
View File
@@ -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'