Typora+PicGo-Core+gitee实现上传服务

1. Typora

偏好设置 => 图像:

  1. 选择插入图片对应的Action为上传服务
  2. 上传服务选择PicGo-Core
  3. 点击下载或更新

2. PicGo-Core插件下载和配置文件

  1. 下载 插件

    cd ~/.config/Typora/picgo/linux/
    ./picgo install gitee-uploader # 上传服务
    ./picgo install super-prefix  # 上传前文件重命名
    
  2. 写入如下配置文件

    vim ~/.picgo/config.json

    {
      "picBed": {
        "current": "gitee",
        "gitee": {
          "repo": "{username}/{rep name}", // 必须是 用户 名 + 仓库名组合  
          "token": "",					// Gitee 私人令牌
          "path": "imgs",		
          "customUrl": "",
          "branch": "master"
        }
      },
      "picgoPlugins": {
        "picgo-plugin-gitee-uploader": true,
        "picgo-plugin-super-prefix": true
      },
      "picgo-plugin-super-prefix": {
        "fileFormat": "YYYYMMDDHHmmss"	//文件重命名格式
      },
    }
    

 需要电脑安装了 nodejs 环境. 上面配置完成后,可以 用Typora验证一下能否上传成功

posted @ 2021-01-16 18:47  liutimo  阅读(143)  评论(0编辑  收藏  举报