约 700 字 预计阅读 2 分钟
如何使用gitea作为typora的图床?
到PicGo官方github仓库的release下载对应平台的安装文件(选择有latest标签的),并进行安装(这里以Windows 11为例,安装过程省略)
PicGo
typora配置PicGo的路径
- 打开typora软件,点击菜单栏的文件。
image-20220326211755455
2. 找到偏好设置(由于这个界面我截不了图所以这里就不放图了),点击箭头所指的文件夹。
image-20220326212023263
选择picgo程序
image-20220326212250031
打开PicGo,下载gitea插件。
image-20220326212449573
创建gitea仓库,并完成第一次push
image-20220326214020556
image-20220326214147688
image-20220326214559116
1
2
3
4
5
6
7
8
9
10
11
12
| # 复制上面的代码,相应的调整一下
mkdir img
cd img
mkdir img
cd img
touch README.md
cd ..
git init
git add .
git commit -m "first commit"
git remote add origin https://example.com/你的用户名/img.git
git push -u origin master
|
配置gitea插件,找到图床设置,打开Gitea Img进行配置。
image-20220326212652117
1
2
3
4
5
| URL 你gitea的域名,例如:https://example.com/
Usernaem 你gitea的用户名,例如:test
Repository 你gitea上用来存放图片的仓库名,例如:img
Token 参照下面的方法生成,然后复制粘贴上去
Path 仓库的相对路径,非填项,你也可以填,我就填img,你的仓库必须存在这个路径才可以填
|
image-20220326213257477
image-20220326213206718
image-20220326213419078
然后确认,也可以设为默认图床(建议设置)
image-20220326213552467
最后验证一下配置。
image-20220326215435459
image-20220326215703868
出现这个配置就没有什么问题。
最后配置一下上传规则就可以了,然后粘贴图片到typora就会自动上传的gitea了。
image-20220326215842447
enjoy!