From 5012e71c87dd8832ccf4b1d8dc087815227c534c Mon Sep 17 00:00:00 2001 From: Chenxing Luo Date: Mon, 4 Apr 2022 08:21:24 -0400 Subject: [PATCH] =?UTF-8?q?docs:=20=E6=A0=BC=E5=BC=8F=E5=8C=96=E6=96=87?= =?UTF-8?q?=E6=A1=A3=20(#9450)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Format doc * Update api.md * Add tag for and fix English documentation * Update docs/parameter.md Co-authored-by: Tony * Update docs/parameter.md Co-authored-by: Tony Co-authored-by: Tony --- docs/.vuepress/components/Route.vue | 2 +- docs/.vuepress/components/RouteEn.vue | 2 +- docs/api.md | 2 +- docs/en/api.md | 2 +- docs/en/parameter.md | 38 +++++++++++++-------------- docs/parameter.md | 32 +++++++++++----------- 6 files changed, 39 insertions(+), 39 deletions(-) diff --git a/docs/.vuepress/components/Route.vue b/docs/.vuepress/components/Route.vue index a83a40db54..b9df5cfde2 100644 --- a/docs/.vuepress/components/Route.vue +++ b/docs/.vuepress/components/Route.vue @@ -15,7 +15,7 @@

参数: -

  • {{item.replace(':','').replace('/','').replace('?','')}}, {{(item.includes('?'))?'可选':'必选'}} -

+
  • {{item.replace(':','').replace('/','').replace('?','')}}, {{(item.includes('?'))?'可选':'必选'}} -

参数: 无

diff --git a/docs/.vuepress/components/RouteEn.vue b/docs/.vuepress/components/RouteEn.vue index 11443c33eb..9e1b84c743 100644 --- a/docs/.vuepress/components/RouteEn.vue +++ b/docs/.vuepress/components/RouteEn.vue @@ -15,7 +15,7 @@

Parameters: -

  • {{item.replace('?','')}}, {{(item.includes('?'))?'optional':'required'}} -

+
  • {{item.replace('?','')}}, {{(item.includes('?'))?'optional':'required'}} -

Parameters: N/A

diff --git a/docs/api.md b/docs/api.md index 212237619c..46dee00026 100644 --- a/docs/api.md +++ b/docs/api.md @@ -18,7 +18,7 @@ RSSHub 提供下列 API 接口: 参数: -- name, 路由一级名称,对应 中的文件夹名称。可选,**缺省则返回所有可用路由**. +- `name`, 路由一级名称,对应 中的文件夹名称。可选,**缺省则返回所有可用路由**. 成功请求将会返回 HTTP 状态码 `200 OK` 与 JSON 结果,格式如下: diff --git a/docs/en/api.md b/docs/en/api.md index 90d199dff9..acf95f4707 100644 --- a/docs/en/api.md +++ b/docs/en/api.md @@ -18,7 +18,7 @@ Route: `/api/routes/:name?` Parameters: -- name, route's top level name as in [https://github.com/DIYgod/RSSHub/tree/master/lib/routes](https://github.com/DIYgod/RSSHub/tree/master/lib/routes). Optional, **returns all public routes if not specified**. +- `name`, route's top level name as in [https://github.com/DIYgod/RSSHub/tree/master/lib/routes](https://github.com/DIYgod/RSSHub/tree/master/lib/routes). Optional, **returns all public routes if not specified**. A successful request returns a HTTP status code `200 OK` with the result in JSON: diff --git a/docs/en/parameter.md b/docs/en/parameter.md index 6f2abb85b3..9db8a9b591 100644 --- a/docs/en/parameter.md +++ b/docs/en/parameter.md @@ -2,7 +2,7 @@ ::: tip -All parameters can be linked with `&` to used together to generate a complex feed. +The parameters can be linked with `&` to used together to generate a complex feed. ::: @@ -12,27 +12,27 @@ The following URL query parameters are supported, Regex support is built-in. Set `filter` to include the content -- filter: filter title and description +- `filter`: filter `title` and description -- filter_title: filter title only +- `filter_title`: filter `title` only -- filter_description: filter description only +- `filter_description`: filter `description` only -- filter_author: filter author only +- `filter_author`: filter `author` only -- filter_time: filter pubDate, value for second number, return specified time range. Item without `pubDate` will not be filtered. +- `filter_time`: filter `pubDate`, in seconds, return specified time range. Item without `pubDate` will not be filtered. For example: [https://rsshub.app/dribbble/popular?filter=Blue|Yellow|Black](https://rsshub.app/dribbble/popular?filter=Blue|Yellow|Black) Set `filterout` to exclude unwanted content. -- filterout: filter title and description +- `filterout`: filter `title` and description -- filterout_title: filter title only +- `filterout_title`: filter `title` only -- filterout_description: filter description only +- `filterout_description`: filter `description` only -- filterout_author: filter author only +- `filterout_author`: filter `author` only For example: [https://rsshub.app/dribbble/popular?filterout=Blue|Yellow|Black](https://rsshub.app/dribbble/popular?filterout=Blue|Yellow|Black) @@ -46,13 +46,13 @@ Example: [https://rsshub.app/dribbble/popular?filter=BluE|yeLLow|BlaCK&filter_ca Set `limit` to limit the number of articles in the feed. -Eg: Dribbble Popular Top 10 [https://rsshub.app/dribbble/popular?limit=10](https://rsshub.app/dribbble/popular?limit=10) +E.g. Dribbble Popular Top 10 [https://rsshub.app/dribbble/popular?limit=10](https://rsshub.app/dribbble/popular?limit=10) ## Fulltext Enable fulltext via `mode` parameter. -Eg: bilibili article +E.g. Bilibili article ## Access Control @@ -64,27 +64,27 @@ Replace website link with Telegram's Instant View link. Enable Telegram Instant View requires a page template, it can be obtained from Telegram's [Instant View page](https://instantview.telegram.org/) -- tgiv: template hash, obtained from the link of template page generated(the string after `&rhash=`) +- `tgiv`: template hash, obtained from the link of template page generated(the string after `&rhash=`) -Eg: +E.g. ## Sci-hub link Output Sci-hub link in scientific journal routes, this supports major journals or routes that output DOIs. -- scihub: set to any value +- `scihub`: set to any value -Eg: +E.g. ## Conversion between Traditional and Simplified Chinese -- opencc: s2t (Simplified Chinese to Traditional Chinese)、t2s (Traditional Chinese to Simplified Chinese), other optional values refer to [simplecc-wasm - Configurations](https://github.com/fengkx/simplecc-wasm#%E9%85%8D%E7%BD%AE-configurations) +- `opencc`: `s2t` (Simplified Chinese to Traditional Chinese)、`t2s` (Traditional Chinese to Simplified Chinese), other optional values refer to [simplecc-wasm - Configurations](https://github.com/fengkx/simplecc-wasm#%E9%85%8D%E7%BD%AE-configurations) -Eg: +E.g. ## Output Formats -RSSHub conforms to RSS 2.0 and Atom Standard, simply append `.rss` `.atom` to the end of the feed address to obtain the feed in corresponding format, default to RSS 2.0. +RSSHub conforms to RSS 2.0 and Atom Standard, simply append `.rss` `.atom` to the end of the feed address to obtain the feed in corresponding format. The default output format is RSS 2.0. For example: diff --git a/docs/parameter.md b/docs/parameter.md index 747747c8f3..034a193d10 100644 --- a/docs/parameter.md +++ b/docs/parameter.md @@ -8,38 +8,38 @@ ## 内容过滤 -可以使用以下 URL query 过滤内容,支持正则 +可以使用以下 URL query 过滤内容,支持通过正则表达式过滤 -filter 选出想要的内容 +`filter` 选出想要的内容 -- filter: 过滤标题和描述 +- `filter`: 过滤标题和描述 -- filter_title: 过滤标题 +- `filter_title`: 过滤标题 -- filter_description: 过滤描述 +- `filter_description`: 过滤描述 -- filter_author: 过滤作者 +- `filter_author`: 过滤作者 -- filter_time: 过滤时间,仅支持数字,单位为秒。返回指定时间范围内的内容。如果条目没有输出`pubDate`或者格式不正确将不会被过滤 +- `filter_time`: 过滤时间,仅支持数字,单位为秒。返回指定时间范围内的内容。如果条目没有输出`pubDate`或者格式不正确将不会被过滤 举例 1: `https://rsshub.app/bilibili/fav/2267573/801952073?filter=编曲|摄影` 举例 2: -filterout 去掉不要的内容 +`filterout` 去掉不要的内容 -- filterout: 过滤标题和描述 +- `filterout`: 过滤标题和描述 -- filterout_title: 过滤标题 +- `filterout_title`: 过滤标题 -- filterout_description: 过滤描述 +- `filterout_description`: 过滤描述 -- filterout_author: 过滤作者 +- `filterout_author`: 过滤作者 举例: `https://rsshub.app/bilibili/fav/2267573/801952073?filterout=编曲|摄影` `filter_case_sensitive` 过滤是否区分大小写,`filter` 和 `filterout`同时适用 -默认为 true,区分大小写 +默认为 `true`,区分大小写 举例 1: @@ -65,7 +65,7 @@ filterout 去掉不要的内容 Telegram 即时预览模式需要在官网制作页面处理模板,请前往[官网](https://instantview.telegram.org/)了解更多 -- tgiv: 模板 hash,可从模板制作页面分享出来的链接末尾获取(`&rhash=`后面跟着的字符串) +- `tgiv`: 模板 hash,可从模板制作页面分享出来的链接末尾获取(`&rhash=`后面跟着的字符串) 举例: @@ -73,13 +73,13 @@ Telegram 即时预览模式需要在官网制作页面处理模板,请前往[ 可以输出 Sci-hub 链接,用于知名期刊或输出 DOI 的科学期刊类 RSS。 -- scihub: 任意值开启 +- `scihub`: 任意值开启 举例: ## 中文简繁体转换 -- opencc: s2t 简体转繁体、t2s 繁体转简体,其它可选值见 [simple-wasm - Configurations](https://github.com/fengkx/simplecc-wasm#%E9%85%8D%E7%BD%AE-configurations) +- `opencc`: `s2t` 简体转繁体、`t2s` 繁体转简体,其它可选值见 [simple-wasm - Configurations](https://github.com/fengkx/simplecc-wasm#%E9%85%8D%E7%BD%AE-configurations) 举例: