hexo搭建

这是一篇用于记录hexo搭建的日志,用于记录遇到的所有问题:

搭建

hexo搭建:https://zhuanlan.zhihu.com/p/25729240

标签和分类

tags和categories用法:https://github.com/hexojs/hexo/issues/320

增加搜索功能

增加搜索功能:http://www.itfanr.cc/2017/10/27/add-search-function-to-hexo-blog/

增加本站访问统计次数

使用了不蒜子 插件:http://ibruce.info/2015/04/04/busuanzi/

修改hemes/你的主题/layout/_partial/footer.ejs文件

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<script async src="https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<div class="copyright" >
{% set current = date(Date.now(), "YYYY") %}
&copy; {% if theme.since and theme.since != current %} {{ theme.since }} - {% endif %}
<span itemprop="copyrightYear">{{ current }}</span>
<span class="with-love">
<i class="fa fa-{{ theme.authoricon }}"></i>
</span>
<span class="author" itemprop="copyrightHolder">{{ config.author }}</span>
</div>
<div class="powered-by">
<i class="fa fa-user-md"></i>
<span id="busuanzi_container_site_uv">
本站访客数:<span id="busuanzi_value_site_uv"></span>人次
</span>
</div>
<div class="theme-info">
<span id="busuanzi_container_site_pv">
本站总访问量<span id="busuanzi_value_site_pv"></span>次
</span>
</div>

我这里去掉了 “由 Hexo 强力驱动 | 主题 - NexT.Gemini“字样

hexo 部署后,绑定域名清空的问题

hexo 部署后 git项目的 Custom domain清空:在source文件夹下面建个CNAME文件夹,里面写上自己的域名,同样的,favicon.ico也可以在里面设置。
参考: https://www.zhihu.com/question/28814437