mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-11-23 22:49:41 +08:00
1 parent
27ef2dd36d
commit
0a3a66a1cb
2 files changed
+8
-1
No files matched your search
@@ -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