首页 > 其他 > 详细

hexo添加百度统计

时间:2017-12-04 14:00:53      阅读:223      评论:0      收藏:0      [点我收藏+]

litten的主题yilia

  • 编辑文件 themes/yilia/_config.yml,添加一行配置,可以删除原来的google analytics

baidu_tongji: true

  • 新建 themes/yilia/layout/_partial/baidu_tongji.ejs,内容如下
<% if (theme.baidu_tongji) { %>
<script type="text/javascript">
#申请的百度统计代码
</script>
<% } %>
  • 编辑themes/yilia/layout/_partial/head.ejs 在 </head> 前添加<%- partial("baidu_tongji") %>
  • 重新生产部署站点即可。

参考

hexo添加百度统计

原文:http://www.cnblogs.com/fazero/p/7976651.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!