Skip to content

Commit

Permalink
fix(route): rsshub new docs link (#15123)
Browse files Browse the repository at this point in the history
  • Loading branch information
TonyRL authored Apr 5, 2024
1 parent c943f67 commit 4eec3f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
10 changes: 1 addition & 9 deletions lib/routes/rsshub/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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/*'],
Expand Down Expand Up @@ -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'),
};
}),
Expand Down
1 change: 1 addition & 0 deletions lib/types.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand Down

0 comments on commit 4eec3f6

Please sign in to comment.