Fork me on GitHub

Hexo之坑

关于博客搭建

主要参考了百度CSDN这两篇文章。

Hexo官方文档:https://hexo.io/zh-cn/docs/


坑1:在git部署hexo时,无法传主题,但是在本地部署时则没有任何问题。
答:需要在_config.yml下的#url下的root添加自己项目的名字。例如:我的项目名是:zwz.github.io,则添加至root/zwz.github.io即可

坑2:无法部署至github。
答:需要在_config.yml下的UrlDeploy下将urlrepo补齐。例如:我的github项目地址为:https://github.com/Zhuweizhoong/zwz.github.io..那么就在url和repo下添加:https://github.com/Zhuweizhoong/zwz.github.io.git即可。注意: url中不需要补.git

坑3:本地更新并上传了文章,为啥网页没有更新?
答:1、上传需要时间 2、尝试按ctrl + F5清除页面缓存

坑4:创建了categories,但是点进去是空白页面
答:1、需要在_config.yml修改完categories配置再进行hexo new page categories 2、创建的的文档需要有categories标注,并且在tags之上,或者删除tags

坑5:busuanzi无法统计访问网站的人数
答:将在footer.swig(路径:/next/layout/_partials/)和
busaunzi-counter.swig(路径:/next/layout/analytics/)中的src的值替换为"https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"

-------------Nothing in the dark-------------