在themes/yilia/_config.yml
添加屬性html
# 是否開啓訪問量統計功能(不蒜子) busuanzi: enable: true
在themes/yilia/layout/_partial/footer.ejs
末尾添加以下代碼git
<% if (theme.busuanzi && theme.busuanzi.enable){ %> <!-- 不蒜子統計 --> <span id="busuanzi_container_site_pv"> 本站總訪問量<span id="busuanzi_value_site_pv"></span>次 </span> <span class="post-meta-divider">|</span> <span id="busuanzi_container_site_uv" style='display:none'> 本站訪客數<span id="busuanzi_value_site_uv"></span>人 </span> <script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script> <% } %>
在themes/yilia/layout/_partial/post/date.ejs
開頭添加以下代碼github
<% if (theme.busuanzi && theme.busuanzi.enable && !index){ %> <!-- 不蒜子統計 --> <span id="busuanzi_container_page_pv" style='display:none' class="<%= class_name %>"> <i class="icon-smile icon"></i> 閱讀數:<span id="busuanzi_value_page_pv"></span>次 </span> <% } %>
Everything is ok. But you have to do by yourself.