3

用markdown格式写博客怎么让图片上传更方便

 2 years ago
source link: http://www.lcsays.com/tutorial/how-to-write-markdown-blog/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
profile picture

I'm 李闯Lucas

10余年互联网技术老鸟,全栈工程师。


不会做小程序的后端研发不是好码农。

用markdown格式写博客怎么让图片上传更方便

类似于hugo这类通过编译成静态文件的方式来写博客,对于博主来说是非常方便的,而且内容都是用markdown语法来书写,很快速就能实现排版。但是文章中的图片就不那么好处理了,存在代码仓库里,时间久了就会非常臃肿,放到图床上又很麻烦,每次都要截图,上传,然后拿到地址,在贴回文章里。

今天发现了一个非常好用的工具,叫做PicGo,他的功能就是,设定一个快捷键(如:Shift+Alt+W),先屏幕截图(这个快捷键相信你已经用的很熟练了),然后按Shift+Alt+W(PicGo后台会自动把截图上传到阿里云oss),然后回到你的博客编辑页,按Ctrl+V,直接就能把图片地址加上markdown语法贴上去。整个过程不到5s终,相当方便。

PicGo的下载地址可以去github里找:https://github.com/Molunerfinn/PicGo/releases

那么PicGo如何设置阿里云OSS呢,首先去阿里云注册一个OSS的bucket,然后在PicGo中设置好即可,如下:

快捷键的设置方法:

用PicGo配合着markdown编辑工具atom(下载地址:https://atom.io/)真是相当方便。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK