赞
踩
由于之前错误在桌面执行了git clean导致桌面里的笔记全没了之后,深刻意识到备份的重要性。但是实时备份有时候会忘记,不如每次写完上传云端一劳永逸,还能做一个分享~
记笔记时使用的是Typora,界面清爽,快捷键友好,但是最大的问题是图片的路径问题。
单纯的使用Typora显然是不方便的,这个时候我们要借助PicGo这个图床软件,将我们.md文件中的图片实时上传到云端。由于url往往是固定的,无论在本地或是上传到blog上,引用的都是固定的url,就不用担心本地图片被移动或者上传blog无法读取图片的问题了。
简而言之,使用PicGo能够解决图片在本地或网站上的显示问题。
那究竟上传到哪个图床,有非常多的选择项,类似于默认的SM.MS图床,腾讯云COS等等,由于考虑到操作的方便性,且我一般只是记录typora才会用到图床,并没有云端存储图片的习惯。刚开始我优先选择的是Github,毕竟使用的也比较多,但是出现了两个问题:
# GitHub Start
140.82.113.3 github.com
140.82.114.20 gist.github.com
151.101.184.133 assets-cdn.github.com
151.101.184.133 raw.githubusercontent.com
151.101.184.133 gist.githubusercontent.com
151.101.184.133 cloud.githubusercontent.com
151.101.184.133 camo.githubusercontent.com
151.101.184.133 avatars0.githubusercontent.com
199.232.68.133 avatars0.githubusercontent.com
199.232.28.133 avatars1.githubusercontent.com
151.101.184.133 avatars1.githubusercontent.com
151.101.184.133 avatars2.githubusercontent.com
199.232.28.133 avatars2.githubusercontent.com
151.101.184.133 avatars3.githubusercontent.com
199.232.68.133 avatars3.githubusercontent.com
151.101.184.133 avatars4.githubusercontent.com
199.232.68.133 avatars4.githubusercontent.com
151.101.184.133 avatars5.githubusercontent.com
199.232.68.133 avatars5.githubusercontent.com
151.101.184.133 avatars6.githubusercontent.com
199.232.68.133 avatars6.githubusercontent.com
151.101.184.133 avatars7.githubusercontent.com
199.232.68.133 avatars7.githubusercontent.com
151.101.184.133 avatars8.githubusercontent.com
199.232.68.133 avatars8.githubusercontent.com
# GitHub End
当你想要编辑时,会出现以下提示:您没有权限写到文件“hosts”所在的文件夹
解决方法:点击复制-保存到桌面,然后在副本中修改,修改完之后将桌面上的host_副本改成host,替换etc目录下的host
这样github就能显示图片了
这个时候我就想到了gitee,访问速度非常快,体验感很好,但是刚下载下来的PicGo是不自带gitee图床的,我们需要下载插件,在插件设置里搜索gitee:
两个都可以用,但是两者的配置略微不同,我用的是右边这个,gitee-uploader 1.1.2。
在配置之前,首先我们要在gitee创建仓库并生成令牌
我选择的gitee插件是gitee-uploader 1.1.2,配置如下:
另一个插件的配置略微不同,配置十分重要,要是没配置对,图片是无法自动上传的。
PicGo配置完成后,确定能上传图片到gitee后,我们将PicGo配置到Typora,联动使用。
打开Typora—偏好设置—图像—上传服务设定选择PicGo.app
点击验证图片上传选项
出现如下所示则验证成功
若出现{“success”:“false”},检查PicGo里的Server是否是如下所示
,地址为127.0.0.1,监听端口是36677
全部完成之后,我们就可以使用Typora+PicGo+gitee随时保存图片了,这里强烈建议打开PicGo里的这三个按钮,在每次图片上传之前重命名图片,有利于之后笔记中图片整理和分类。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。