mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-10-16 21:02:57 +08:00
@@ -22,3 +22,10 @@ describe('api/radar/rules/one', () => {
|
||||
expect(text).toBe('');
|
||||
});
|
||||
});
|
||||
|
||||
describe('api/radar/rules/docs', () => {
|
||||
it('links docs to the route namespace page', async () => {
|
||||
const rules = await getRadarRules();
|
||||
expect(rules['github.com']['.'][0].docs).toBe('https://docs.rsshub.app/routes/github');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -34,7 +34,7 @@ export const getRadarRules = async (): Promise<Record<string, RadarDomain>> => {
|
||||
}
|
||||
rules[domain][subdomain].push({
|
||||
title: radarItem.title || data.name,
|
||||
docs: `https://docs.rsshub.app/routes/${data.categories?.[0] || 'other'}`,
|
||||
docs: `https://docs.rsshub.app/routes/${namespace}`,
|
||||
source: radarItem.source.map((source) => {
|
||||
const sourceURL = new URL('https://' + source);
|
||||
return sourceURL.pathname + sourceURL.search + sourceURL.hash;
|
||||
|
||||
Reference in New Issue
Block a user