diff --git a/scripts/workflow/build-routes.ts b/scripts/workflow/build-routes.ts index c4d244a2d0..3166f41781 100644 --- a/scripts/workflow/build-routes.ts +++ b/scripts/workflow/build-routes.ts @@ -40,25 +40,10 @@ const allRoutePaths = new Set(); // Use all namespaces for both regular and Worker builds. for (const namespace in namespaces) { const namespaceData = namespaces[namespace]; - let defaultCategory = namespaceData.categories?.[0]; - if (!defaultCategory) { - for (const path in namespaceData.routes) { - if (!namespaceData.routes[path].categories) { - continue; - } - - defaultCategory = namespaceData.routes[path].categories[0]; - break; - } - } - if (!defaultCategory) { - defaultCategory = 'other'; - } for (const path in namespaceData.routes) { const realPath = `/${namespace}${path}`; allRoutePaths.add(realPath); const data = namespaceData.routes[path]; - const categories = data.categories || namespaceData.categories || [defaultCategory]; // maintainers if (data.maintainers) { maintainers[realPath] = data.maintainers; @@ -82,7 +67,7 @@ for (const namespace in namespaces) { } radar[domain][subdomain].push({ title: radarItem.title || data.name, - docs: `https://docs.rsshub.app/routes/${categories[0]}`, + 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;