美文网首页Hexo
HEXO: 给博文增加分类

HEXO: 给博文增加分类

作者: yiiina | 来源:发表于2018-12-27 16:11 被阅读1次

    增加分类属性

    步骤参考这篇文章 → Hexo使用攻略-添加分类及标签

    问题1:在增加分类的时候部署失败

    yina:blog Yina$ hexo d
    INFO  Deploying: git
    INFO  Clearing .deploy_git folder...
    INFO  Copying files from public folder...
    INFO  Copying files from extend dirs...
    On branch master
    nothing to commit, working tree clean
    ssh_exchange_identification: Connection closed by remote host
    fatal: Could not read from remote repository.
    
    Please make sure you have the correct access rights
    and the repository exists.
    FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/docs/troubleshooting.html
    Error: ssh_exchange_identification: Connection closed by remote host
    fatal: Could not read from remote repository.
    
    Please make sure you have the correct access rights
    and the repository exists.
    
        at ChildProcess.<anonymous> (/Users/Yina/blog/node_modules/hexo-util/lib/spawn.js:37:17)
        at ChildProcess.emit (events.js:182:13)
        at maybeClose (internal/child_process.js:962:16)
        at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
    
    

    问题:
    fatal: Could not read from remote repository.

    原因:
    access rights
    Please make sure you have the correct access rights
    and the repository exists.

    Error: ssh_exchange_identification: Connection closed by remote host
    fatal: Could not read from remote repository.

    Please make sure you have the correct access rights
    and the repository exists.

    找到一个链接:https://github.com/hexojs/hexo/issues/2767
    提供的解决方案:

    15451995366440.jpg

    测试:
    可以实现部署。

    问题2:分类博文在远程出现404错误

    15452011349528.jpg

    过了段时间重新试了下就OK了


    15452057624750.jpg

    问题3:分类没有入口

    通过谷歌找到解决方法

    要在主题的注册文件中修改。


    15452942499279.jpg

    before

    menu:
      home: / || home
      #about: /about/ || user
      #tags: /tags/ || tags
      #categories: /categories/ || th 
    

    after

    menu:
      home: / || home
      #about: /about/ || user
      #tags: /tags/ || tags
      categories: /categories/ || th
    

    相关文章

      网友评论

        本文标题:HEXO: 给博文增加分类

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