npm 修改ali源:
npm config set registry https://registry.npm.taobao.org
# 查看
npm config get registry
PicGo 官网: https://picgo.github.io/PicGo-Core-Doc/

安装:
Global install
npm install picgo -g
# or
yarn global add picgo
Local install
npm install picgo -D
# or
yarn add picgo -D
插件列表:
https://github.com/PicGo/Awesome-PicGo
搜索并安装插件 , 我这里安装了 gitee和 compress

gitee 插件
Config
- repo: repo name, split by '/', eg:
owner/repoName
- branch: default
master
- token: gitee
personal access token
- path: file path
- customPath: auto config path
- customUrl: used to insead of
https://gitee.com/:owner/:repo/raw/:path/:filename
, eg:${customUrl}/path/filename.jpg
makesure the customUrl
can access your repo
customPath
自动配置path路径 示例:path:blog/$customPath
- customPath选择年,则实际的path值为blog/2019
- customPath选择年季,则实际的path值为blog/2019/summer
- customPath选择年月,则实际的path值为blog/2019/01
$customPath
为占位符。
compress 插件
-
安装
picgo add compress
-
选择使用
picgo use transformer
-
参数配置
picgo config plugin compress
compress 选择压缩工具 默认选项
nameType 是否重命名
- timestamp 重命名成时间戳
- none 不重名,默认选项
key 可选
- 在 developers 中申请
- 逗号
,
隔开,可使用多个 Key 叠加使用次数
界面上启用 , 启用后 , 压缩功能才会启用:

网友评论