hexo + BeanTech theme to increase site traffic and traffic article

  1. Configuration is turned on without garlic traffic statistics

    In themes/yilia/_config.ymladd properties

    # 是否开启访问量统计功能(不蒜子)
    busuanzi:
     enable: true
    
  2. Add garlic and introduced no site visits

    In themes/yilia/layout/_partial/footer.ejsthe following code place

    <% if (theme.busuanzi && theme.busuanzi.enable){ %>
    	<!-- 不蒜子统计 -->
    	<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>
    <% } %>
    

Here Insert Picture Description
Here Insert Picture Description
3. Add the article Visits

In the file themes/yilia/layout/_partial/header.ejsadd the code appropriate location:

<span id="busuanzi_container_page_pv">
  本文总阅读量<span id="busuanzi_value_page_pv"></span></span>

I am here it is to the inside label made changes in the original, there is no problem as long as the same id.

Here Insert Picture Description
Results as shown:
Here Insert Picture Description

Welcome to my personal blog

Published 26 original articles · won praise 27 · views 6866

Guess you like

Origin blog.csdn.net/qq_40705355/article/details/100033982