From d979310c1a6a71db2e55d1c0de3df3327c93aeb0 Mon Sep 17 00:00:00 2001 From: NeverBehave Date: Tue, 21 Jun 2022 13:33:25 -0700 Subject: [PATCH] fix(docs): align cn and en docs for experimental params --- docs/en/install/README.md | 6 ++++-- docs/en/parameter.md | 2 +- docs/install/README.md | 4 +++- docs/parameter.md | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/en/install/README.md b/docs/en/install/README.md index 1cc75336f..52618e994 100644 --- a/docs/en/install/README.md +++ b/docs/en/install/README.md @@ -523,9 +523,11 @@ See the relation between access key/code and white/blacklisting. ### Image Processing -::: warning Deprecation warning +::: tip New Config Format -The options below are deprecated, preserved only for backward compatibility, please refer to [Parameters->Multimedia processing](/en/parameter.html#multimedia-processing) for more details. +We are currently testing out a new format, providing end-user with more flexibility. For more info, please refer to [Parameters->Multimedia processing](/en/parameter.html#multimedia-processing). + +When using our new config, please leave the following environment vairable blank. By default, image hotlink template will be forced when present. ::: diff --git a/docs/en/parameter.md b/docs/en/parameter.md index edccba058..afe1ee923 100644 --- a/docs/en/parameter.md +++ b/docs/en/parameter.md @@ -94,7 +94,7 @@ E.g. This is an experimental API -The following operation allows user to inject codes, which is harmful in web environment. However, RSS feed reader usually limits these functions. While normally routes won't need these functions, please set `ALLOW_USER_HOTLINK_TEMPLATE` to `true` if you understand how these parameters works. +The following operation allows users to inject codes, which is harmful(similar to XSS) in Web environment. However, RSS feed readers, usually, have restrictions set up. While normally routes won't need these functions, please set `ALLOW_USER_HOTLINK_TEMPLATE` to `true` if you understand how these parameters works and really need to use these features. ::: diff --git a/docs/install/README.md b/docs/install/README.md index 92f11441a..400c5856a 100644 --- a/docs/install/README.md +++ b/docs/install/README.md @@ -529,10 +529,12 @@ RSSHub 支持使用访问密钥 / 码,白名单和黑名单三种方式进行 ### 图片处理 -::: info 新配置方式 +::: tip 新配置方式 我们正在试验新的,更灵活的配置方式。如果有需要,请转到 [通用参数 -> 多媒体处理](/parameter.html#duo-mei-ti-chu-li) 了解更多。 +在使用新配置时,请将下方环境变量留空。否则默认图片模版会继续遵循下方配置。 + ::: `HOTLINK_TEMPLATE`: 用于处理描述中图片的 URL,绕过防盗链等限制,留空不生效。用法参考 [#2769](https://github.com/DIYgod/RSSHub/issues/2769)。可以使用 [URL](https://developer.mozilla.org/en-US/docs/Web/API/URL#Properties) 的所有属性(加上后缀 `_ue` 则会对其进行 URL 编码),格式为 JS 变量模板。例子:`${protocol}//${host}${pathname}`, `https://i3.wp.com/${host}${pathname}`, `https://images.weserv.nl?url=${href_ue}` diff --git a/docs/parameter.md b/docs/parameter.md index d9bb1c0ff..ca33f8489 100644 --- a/docs/parameter.md +++ b/docs/parameter.md @@ -95,7 +95,7 @@ Telegram 即时预览模式需要在官网制作页面处理模板,请前往[ 这是个测试中的 API -下方操作允许任意用户注入链接模版到最终输出结果,针对于 Web 环境来说这是有害的(XSS)。但是 RSS 阅读器内通常是有限制的环境,通常不会带来副作用,一般路由通常不会需要这些功能。如果需要开启,请将 `ALLOW_USER_HOTLINK_TEMPLATE` 环境变量设置为 `true` +下方操作允许任意用户注入链接模版到最终输出结果,针对于 Web 环境来说这是有害的(XSS)。但是 RSS 阅读器内通常是有限制的环境,通常不会带来副作用,但同时一般路由通常不会需要这些功能。如果需要开启,请将 `ALLOW_USER_HOTLINK_TEMPLATE` 环境变量设置为 `true` :::