Typora + git + smms图床实现同步笔记

Github配置

创建私有仓库,配置SSH密钥,部署git环境

https://www.liaoxuefeng.com/wiki/896043488029600

SM图床配置

部署Node.js和Picgo-core, 默认上传图床为sm.ms

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
houser@Housers-MacBook-Pro ~ % brew install node
houser@Housers-MacBook-Pro ~ % node --version
v16.11.0
houser@Housers-MacBook-Pro ~ % npm -v
8.0.0
houser@Housers-MacBook-Pro ~ % npm install picgo -g
houser@Housers-MacBook-Pro ~ % picgo -version
1.4.26
houser@Housers-MacBook-Pro ~ % picgo use uploader // 配置图床,默认是sm.ms //
houser@Housers-MacBook-Pro ~ % cat ~/.picgo/config.json
{
"picBed": {
"uploader": "smms",
"smms":{
"token":"Paste your smms API Token here"
}
},
"picgoPlugins": {}
}

Picgo命令行测试

1
2
3
4
5
6
7
8
houser@Housers-MacBook-Pro Desktop % cd ~/Desktop
houser@Housers-MacBook-Pro Desktop % picgo u ./test.png // 一张随便在Typora网站上复制的图片 //
[PicGo INFO]: Before transform
[PicGo INFO]: Transforming... Current transformer is [path]
[PicGo INFO]: Before upload
[PicGo INFO]: Uploading... Current uploader is [smms]
[PicGo SUCCESS]:
https://i.loli.net/2021/10/12/ZUGhV1fWmFTLxl9.png

Typor 拖拽上传测试

Screen Shot 2021-10-12 at 17.12.46

参考链接

https://mp.weixin.qq.com/s/w6-LQLAApN7HhXaBwslegw