refactor(route): change hackernews user route to EN and add popular category

This commit is contained in:
pseudoyu
2024-09-24 17:10:09 +08:00
parent d5f7821d65
commit 339a5fadc9
+14 -4
View File
@@ -6,9 +6,19 @@ import { parseDate } from '@/utils/parse-date';
export const route: Route = {
path: '/:section?/:type?/:user?',
categories: ['programming'],
categories: ['programming', 'popular'],
example: '/hackernews/threads/comments_list/dang',
parameters: { section: '内容分区,见上表,默认为 `index`', type: '链接类型,见上表,默认为 `sources`', user: '设定用户,只在 `threads` 和 `submitted` 分区有效' },
parameters: {
section: {
description: 'Content section, default to `index`',
},
type: {
description: 'Link type, default to `sources`',
},
user: {
description: 'Set user, only valid in `threads` and `submitted` sections',
},
},
features: {
requireConfig: false,
requirePuppeteer: false,
@@ -22,10 +32,10 @@ export const route: Route = {
source: ['news.ycombinator.com/:section', 'news.ycombinator.com/'],
},
],
name: '用户',
name: 'User',
maintainers: ['nczitzk', 'xie-dongping'],
handler,
description: `订阅特定用户的内容`,
description: `Subscribe to the content of a specific user`,
};
async function handler(ctx) {