教程参考html
Typora+PicGo-Core(command line)+Gitee实现图片上传到图床 主要借鉴 picgo 操做命令
java
Typora + PicGo + Gitee 实现图片自动上传到图床 主要借鉴 gitee 图床的搭建
node
请自行百度解决...linux
// npm 命令执行速度过慢的话,咱们能够使用一下淘宝的镜像 npm install -g picgo --registry=https://registry.npm.taobao.org // 安装完成之后测试一下是否安装成功 picgo -v
picgo install gitee-uploader
C:\Users\Run\Desktop>picgo set uploader ? Choose a(n) uploader (Use arrow keys) ❯ gitee smms tcyun github qiniu imgur aliyun upyun (Move up and down to reveal more choices) ? Choose a(n) uploader gitee ? repo: xxxx/image ? branch: master ? token: 5a34fa3f348d556... ? path: 2020 ? customPath: 年月 ? customUrl: https://gitee.com/xxxx/image/raw/master/ [PicGo SUCCESS]: Configure config successfully!
重点是 自定义命令
的组成部分: [your node path] [your picgo path] upload
git
键 | 值 |
---|---|
上传服务 | Custom Command |
自定义命令 | D:\nodejs\node.exe D:\nodejs\node_global\node_modules\picgo\bin\picgo upload |
注意:配置完成后能够点击 验证图片上传选项
来测试是否配置成功github
如下是参照 PicGo-Core官方文档 的进行的配置npm
首先咱们须要找到咱们的配置文件,picgo 的默认配置文件在不一样系统的目录不太同样:
linux 和 macOS 均为 ~/.picgo/config.json
windows 则为 C:\Users\{你的用户名}\.picgo\config.json
json
{ "picBed": { "current": "gitee", "gitee": { "repo": "xxxx/image", "branch": "master", "token": "5a34fa3f348d556...", "path": "2020", "customPath": "yearMonth", "customUrl": "https://gitee.com/xxxx/image/raw/master/" }, "uploader": "gitee", "transformer": "path" }, "picgoPlugins": { "picgo-plugin-gitee-uploader": true }, "picgo-plugin-gitee-uploader": { "lastSync": "2020-07-30 10:29:26" } }