markdown工具链
typora安装
typora已收费,个人是买了订阅。
有个差不多的平替 marktext, 开源, 效果也不错。
对象存储OSS
阿里云,腾讯云等云厂商都提供对象存储服务。个人用的话(访问量不大),超级超级便宜。
以阿里云oss为例,
控制台-》搜索对象存储-》新建bucket, 私有写公共读。记住endpoint相关的参数。
ram控制台,新建子账号(也可以直接用根账号),分配对象存储相关所有权限, 并生成 accessKey 和secret.
高端玩家也可以买域名, 搭minIO/ceph 的对象存储服务。
Picgo安装
这里选择从官网下载picgo GUI的版本,主要用于拖拽上传。
同时在typora中下载bundled的picgo命令行版本, 专用于typora.
然后同步一下两者的配置。(最后还是会有点不同的)
Picgo GUI安装
项目主页: https://github.com/PicGo/PicGo-Core
下载位置: https://github.com/PicGo/PicGo-Core/tags
插件: https://picgo.github.io/PicGo-Doc/zh/guide/config.html#%E6%8F%92%E4%BB%B6%E8%AE%BE%E7%BD%AE
GUI界面可以拖拽上传, 剪切板上传,也方便配置oss对象存储。然后导出配置也方便。
Picgo GUI -》 图床设置-》阿里云OSS-》根据前面阿里云对象存储的bucket的endpoint, 账号accessKey, secret等信息配置
Picgo GUI-》Picgo设置-》开启:时间戳重命名(主要是防止出现重名问题)
Picgo GUI-》Picgo设置-》打开配置文件, 这里是导出的配置文件:
{
"picBed": {
"current": "aliyun",
"uploader": "aliyun",
"smms": {
"token": ""
},
"aliyun": {
"accessKeyId": "LTAI5tLe6nCv8uoW6UT8aUMC",
"accessKeySecret": "NAkhPk5CTd4juim0sw1LiO5GfE7hmq",
"bucket": "picgo12138",
"area": "oss-cn-hangzhou",
"path": "md/",
"customUrl": "",
"options": ""
}
},
"settings": {
"shortKey": {
"picgo:upload": {
"enable": true,
"key": "CommandOrControl+Shift+P",
"name": "upload",
"label": "QUICK_UPLOAD"
}
},
"showUpdateTip": true,
"rename": false,
"autoRename": true,
"privacyEnsure": true,
"server": {
"port": 36677,
"host": "127.0.0.1",
"enable": true
}
},
"needReload": false,
"picgoPlugins": {},
"debug": true,
"PICGO_ENV": "GUI"
}
Picgo命令行安装
相关说明: https://support.typora.io/Upload-Image/#picgo-core-command-line-opensource
typora ->file->preferences->image
选择自动upload image 勾选上传本地, 勾选上传网络的图片
图片上传设置, 选择picgo-core(command-line), 点击 download or upldate (picgo), 打开配置文件。
将Picgo GUI中的配置, 选择性复制到 typora用的到picgo配置中(主要是图床参数)
安装node与npm
到 typora安装的picgo目录
picgo install super-prefix
然后配置下 prefix格式
参考: https://blog.csdn.net/weixin_45696455/article/details/126301567
参考: https://github.com/PicGo/Awesome-PicGo?tab=readme-ov-file
注意autoRename配置与super-prefix插件冲突, 需要关闭
typora用的到picgo配置:
{
"picBed": {
"current": "aliyun",
"uploader": "aliyun",
"smms": {
"token": ""
},
"aliyun": {
"accessKeyId": "LTAI5tLe6nCv8uoW6UT8aUMC",
"accessKeySecret": "NAkhPk5CTd4juim0sw1LiO5GfE7hmq",
"bucket": "picgo12138",
"area": "oss-cn-hangzhou",
"path": "md/",
"customUrl": "",
"options": ""
}
},
"settings": {
//"autoRename": true
},
"picgoPlugins": {
"picgo-plugin-super-prefix": true
},
"picgo-plugin-super-prefix": {
"fileFormat": "YYYYMMDDHHmmss"
}
}
发表回复