警告
本文最后更新于 2020-11-10,文中内容可能已过时。
系统:Ubuntu 20.04 LTS
1
|
sudo apt install npm -y
|
1
|
sudo npm install -g cnpm --registry=https://registry.npm.taobao.org
|
1
|
sudo cnpm install picgo -g
|
Imgur图床的配置方法
PicGo-Core通过命令行生成配置
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
picgo set uploader
? Choose a(n) uploader imgur
? clientId: xxxxxxxxxx
? proxy: http://127.0.0.1:8118
[PicGo SUCCESS]: Configure config successfully!
$ cat ~/.picgo/config.json
{
"picBed": {
"uploader": "smms",
"current": "smms",
"imgur": {
"clientId": "xxxxxxxxxx",
"proxy": "http://127.0.0.1:8118"
}
},
"picgoPlugins": {}
}
|
由于生成的config.json有问题需要修改成
1
2
3
4
5
6
7
8
9
10
11
12
13
|
$ tee ~/.picgo/config.json << EOF
{
"picBed": {
"uploader": "imgur",
"current": "imgur",
"imgur": {
"clientId": "xxxxxxxxxx",
"proxy": "http://127.0.0.1:8118"
}
},
"picgoPlugins": {}
}
EOF
|
由于访问没有走代理,所有图片上传以后国内是无法查看的
淘宝 NPM 镜像
PicGo-Core 配置文件