typora+gitee+picgo-core

本文档介绍了如何在Arch Linux和Windows上配置Typora,利用Gitee作为图床,并通过Picgo-Core实现Markdown图片自动上传。首先确保安装了Node.js和npm,然后在Typora的配置目录安装必要的插件。接着,配置Picgo的图床设置,包括Gitee的repo和token。测试上传成功后,别忘了清理本地的图片缓存文件,可以创建定时任务进行定期清理。
摘要由CSDN通过智能技术生成

typora+gitee+picgo-core



1.设置偏好设置

image-20210727184529250

2.安装插件

确保有nodejs和npm

archlinux

yay -S nodejs npm

安装插件

# 进入目录
cd .config/Typora/picgo/linux
# 安装 super-prefix gitee-uploader
./picgo install super-prefix
./picgo install gitee-uploader

windows下

路径:C:\Users\YOURNAME\AppData\Roaming\Typora\picgo\win64
在这里进入powershell或者cmd步骤如上

3.设置图床

命令行配置

./picgo set uploader
#一步一步选择

或者配置文件vim ~/.picgo/config.json
下面的repo和token改成自己的

{
  "picBed": {
    "current": "gitee",
    "gitee": {
      "repo": "usersite/reponame",
      "branch": "master",
      "token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxx",
      "path": "img",
      "customPath": "default",
      "customUrl": ""
    }
  },
  "picgoPlugins": {
    "picgo-plugin-super-prefix": true,
    "picgo-plugin-gitee-uploader": true
  }
}

4.测试

5.本地图片地址

注意:由于设置了自动上传也会在本地留下缓存的图片文件,所以我们需要定时清除,不论linux还是windows都可以写一个脚本关机执行即可

linux下路径:~/.config/Typora/typora-user-images/

Windows下路径:C:\Users\YOURNAME\AppData\Roaming\Typora\typora-user-images

windows下bat脚本

del /f /s /q C:\Users\YOURNAME\AppData\Roaming\Typora\typora-user-images

记得设置定时清除

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值