Github搭建Typora图床

一、设置Github

image-20221006163253104

二、获取 Github token

点击头像,打开 Settings

Settings -> Developer settings -> Personal access tokens

image-1011533562

image-20221006163456041

image-20221006163815643

点击 Generate token 生成 Token

注:请注意,一定不要忘记保存该token,token仅展示一次,请务必复制保存。

image-20221006163758124

三、设置Typora

打开 ‘文件‘ -> ‘偏好设置

image-20221006160206777

image-20221006160420202

选择 “下载或更新

image-20221011134341594

image-20221011134430164

image-20221011134424250

image-20221006164233761

填写配置文件如下:

{
"picBed": {
"uploader": "github", // 代表当前的默认上传图床为 github
"github":
{
"repo": "Decoow/TyporaPic", // 仓库名,格式是username/reponame
"token": "ghp_xxxxxxxxxxxxxxx", // 获取到的github token*
"branch": "master" // 分支名,默认是master
}
},
"picgoPlugins": {} // 为插件预留
}

image-20221006164108784

四、验证上传

image-20221006164505637

image-20221011132455706