From 339a5fadc9ea0cd32719ef20d613fab8144f768c Mon Sep 17 00:00:00 2001 From: pseudoyu Date: Tue, 24 Sep 2024 17:10:09 +0800 Subject: [PATCH] refactor(route): change hackernews user route to EN and add popular category --- lib/routes/hackernews/index.ts | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/lib/routes/hackernews/index.ts b/lib/routes/hackernews/index.ts index 259a3ff22..ea0a364f6 100644 --- a/lib/routes/hackernews/index.ts +++ b/lib/routes/hackernews/index.ts @@ -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) {