picgo图床配置
node.js环境安装
本次采用Windows二进制文件进行部署,需要手工配置环境变量,也可采用Windows安装包一键安装
二进制绿色版:https://npm.taobao.org/mirrors/node/v16.6.2/node-v16.6.2-win-x64.zip
Windows安装包:https://npm.taobao.org/mirrors/node/v16.6.2/node-v16.6.2-x64.msi
下载picgo:
在node.js目录下运行
npm install picgo -g # or yarn global add picgo
运行结果如下:
配置 PicGo-Core
选项 1:编辑配置文件
请在以下位置编辑config.json
- Linux / macOS : .
~/.picgo/config.json
- Windows: .
%HOMEPATH%\.picgo\config.json
安装SFTP上传插件
npm install picgo-plugin-sftp-uploader
可用插件列表
https://github.com/lemonsboy/Awesome-PicGo
picgo GUI版:
下载picgo gitee上传插件
https://github.com/PicGo/Awesome-PicGo
使用gitee作为图床
获取到token:41965da90bc0b4aad1b8c714cf805ff9
scp 图床
- 安装picgo GUI版
- 在插件中心下载SCP插件
- 图床设置>SSH SCP上传设置
网站标识设置为:image
配置文件如下:config.json
{
"image": {
"url": "https://你的域名",
"path": "相对于网站的目录/{year}/{month}/{fullName}",
"uploadPath": "上传的物理目录/{year}/{month}/{fullName}",
"host": "IP地址",
"port": 22,
"usernameAndPrivateKey": "root",
"password": "root账户的密码"
}
}
评论 (0)