安装picgo-core

安装picgo-core

安装插件

首先安装nodejs,然后进入下边目录,安装相应的插件

cd C:\Users\用户名\AppData\Roaming\Typora\picgo\win64
.\picgo.exe install smms-user
.\picgo.exe install gitee-uploader
.\picgo.exe install github-plus
.\picgo.exe install super-prefix

其中:super-prefix是将上传文件名加上时间戳,避免文件名重复,导致上传失败。

配置文件

打开配置文件:C:\Users\用户名\.picgo\config.json

{
  "picBed": {
    "current": "githubPlus",//选择上传器
    "uploader": "githubPlus",//选择上传器
    "githubPlus": {
      "repo": "用户名/仓库名",
      "branch": "master",
      "token": "自己的token",
      "path": "img/",//路径名
      "customUrl": "https://cdn.nloln.cn/gh/用户名/仓库名",
      "origin": "github"
    },
    "gitee": {
      "branch": "master",
      "customPath": "yearMonth",
      "customUrl": "",
      "path": "img/",
      "repo": "gitee用户名/gitee仓库名",
      "token": "自己的token"
    },
    "smms-user": {
      "Authorization": "替换成你自己的token"
    },
    "transformer": "path"
  },
  "picgoPlugins": {
    "picgo-plugin-super-prefix": true,
    "picgo-plugin-smms-user": true,
    "picgo-plugin-github-plus": true,
    "picgo-plugin-gitee-uploader": true
  },
  "picgo-plugin-super-prefix": {
    "fileFormat": "YYYYMMDDHHmmss"//配置super-prefix插件的时间戳格式
  },
  "picgo-plugin-github-plus": {
    "lastSync": "2024-08-19 10:50:19"
  }
}

验证上传

最后修改:2024 年 08 月 19 日
如果觉得我的文章对你有用,请随意赞赏