feat(图床): 图片替换支持腾讯云图床、阿里云图床、七牛云图床 #107
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
改造思路:https://1874.cool/nvikqw/
配置 图床TOKEN(可选)
语雀的url存在防盗链的问题,直接部署可能导致图片无法加载。
如果需要语雀URL上传到图床中并替换原链接,就需要配置上传密钥。
访问图床的密钥管理获取密钥,然后传入密钥到yuque-hexo
腾讯云API密钥管理
阿里云API密钥管理
七牛云API密钥管理
在设置YUQUE_TOKEN的基础上配置SECRET_ID和SECRET_KEY
命令执行时传入环境变量
YUQUE_TOKEN=xxx SECRET_ID=xxx SECRET_KEY=xxx yuque-hexo sync
set YUQUE_TOKEN=xxx SECRET_ID=xxx SECRET_KEY=xxx && yuque-hexo sync
imgCdn 语雀图片转图床配置说明
注意:开启后会将匹配到的所有的图片都上传到COS