美文网首页
typroa+markdown+Picgo+图床

typroa+markdown+Picgo+图床

作者: Stephenwish | 来源:发表于2020-09-27 13:33 被阅读0次

    typora 是支持markdown语法编辑器,在使用过程种不可避免要使用图片,本次记录下typora集成图床的过程,以及遇到的一些问题

    1.安装PicGo

    安装好界面如下

    image.png

    \bigstar这个是配合typora使用的,typora文件那里找到偏好设置,相关typora设置界面如下

    image.png

    设置路径为Picgo的安装路径

    2.再回到picgo页面设置图床,原生下来的图床包括如下

    image.png

    不同的图床配置稍微不一样,有的喜欢github等,我个人经过测试用github老是上传不了,总是出现各种莫名其妙错误(错误日志可以在下图找到)

    image.png
    ------Error Stack Begin------
    RequestError: Error: read ECONNRESET
        at new RequestError (D:\Program Files\PicGo\resources\app.asar\node_modules\request-promise-core\lib\errors.js:14:15)
        at Request.plumbing.callback (D:\Program Files\PicGo\resources\app.asar\node_modules\request-promise-core\lib\plumbing.js:87:29)
        at Request.RP$callback [as _callback] (D:\Program Files\PicGo\resources\app.asar\node_modules\request-promise-core\lib\plumbing.js:46:31)
        at self.callback (D:\Program Files\PicGo\resources\app.asar\node_modules\request\request.js:185:22)
        at Request.emit (events.js:200:13)
        at Request.onRequestError (D:\Program Files\PicGo\resources\app.asar\node_modules\request\request.js:881:8)
        at ClientRequest.emit (events.js:200:13)
        at TLSSocket.socketErrorListener (_http_client.js:402:9)
        at TLSSocket.emit (events.js:200:13)
        at emitErrorNT (internal/streams/destroy.js:91:8)
    -------Error Stack End-------
    
    ------Error Stack Begin------
    StatusCodeError: 422 - {"message":"path cannot start with a slash","errors":[{"resource":"Commit","field":"path","code":"invalid"}],"documentation_url":"https://docs.github.com/rest/reference/repos#create-or-update-file-contents"}
        at new StatusCodeError (D:\Program Files\PicGo\resources\app.asar\node_modules\request-promise-core\lib\errors.js:32:15)
        at Request.plumbing.callback (D:\Program Files\PicGo\resources\app.asar\node_modules\request-promise-core\lib\plumbing.js:104:33)
        at Request.RP$callback [as _callback] (D:\Program Files\PicGo\resources\app.asar\node_modules\request-promise-core\lib\plumbing.js:46:31)
        at Request.self.callback (D:\Program Files\PicGo\resources\app.asar\node_modules\request\request.js:185:22)
        at Request.emit (events.js:200:13)
        at Request.<anonymous> (D:\Program Files\PicGo\resources\app.asar\node_modules\request\request.js:1161:10)
        at Request.emit (events.js:200:13)
        at IncomingMessage.<anonymous> (D:\Program Files\PicGo\resources\app.asar\node_modules\request\request.js:1083:12)
        at Object.onceWrapper (events.js:288:20)
        at IncomingMessage.emit (events.js:205:15)
    -------Error Stack End-------
    

    \bigstar 这些东西折腾了好久,后来发现一个最简单的方法,使用sm-ms图床
    1,首先把配置文件里面的JSON格式配置删除,就删除picBed里面多余的配置就行了(不是整个picBed,剩下配置参考如下)

    image.png image.png

    2,然后去插件设置那里查找插件smms,搜索并在线安装


    image.png

    3,登录smms官网注册一个号就可以了smms
    有了账号按照下图去dashboard里面拿到token

    image.png image.png

    拿到token后设置到picgo里面就可以了


    image.png

    4,接着你就可以上传图片了,在Picgo上传后会在相册区里找到

    image.png

    5,typora 直接把图片丢进去也会上传到smms,因为它已经和picgo关联了

    相关文章

      网友评论

          本文标题:typroa+markdown+Picgo+图床

          本文链接:https://www.haomeiwen.com/subject/cxakuktx.html