V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
chungzhao
V2EX  ›  Hexo

解决 busuanzi 无效的方法(hexo-theme-next)

  •  
  •   chungzhao · 2018-10-07 18:04:23 +08:00 · 4017 次点击
    这是一个创建于 2020 天前的主题,其中的信息可能已经有所发展或是发生改变。

    可以看看我的 https://chungzh.cn/ 已经有效了

    我的 next 是 6.x.x

    找到 next 主题目录下的 busuanzi-counter.swig,修改成:

    {% if theme.busuanzi_count.enable %}
    <div class="busuanzi-count">
      <script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
    
      {% if theme.busuanzi_count.total_visitors %}
        <span class="site-uv" title="{{ __('footer.total_visitors') }}">
          <i class="fa fa-{{ theme.busuanzi_count.total_visitors_icon }}"></i>
          <span class="busuanzi-value" id="busuanzi_value_site_uv"></span>
        </span>
      {% endif %}
    
      {% if theme.busuanzi_count.total_views %}
        <span class="site-pv" title="{{ __('footer.total_views') }}">
          <i class="fa fa-{{ theme.busuanzi_count.total_views_icon }}"></i>
          <span class="busuanzi-value" id="busuanzi_value_site_pv"></span>
        </span>
      {% endif %}
    </div>
    {% endif %}
    
    
    第 1 条附言  ·  2018-10-07 18:41:19 +08:00
    仅适用于 next 版本在 v6.4.2 之前的
    2 条回复    2018-11-08 14:03:50 +08:00
    chungzhao
        1
    chungzhao  
    OP
       2018-10-07 18:16:13 +08:00
    unangela
        2
    unangela  
       2018-11-08 14:03:50 +08:00
    感谢~~改这一行就可以啦
    <script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5177 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 09:27 · PVG 17:27 · LAX 02:27 · JFK 05:27
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.