使用Hexo里的fluid主题搭建了一个博客,然后在博客中想加入一个访问量统计的功能,按照教程使用leancloud进行操作,创建了一个leancloud账号,进行了实名验证,创建了一个class,并将appid 和 appkey写入了fluid主题config文件中,最终的页面并没有显示访问量和阅读量。
statistics:
enable: true
# 统计数据来源,使用 leancloud 需要设置 `web_analytics: leancloud` 中的参数;使用 busuanzi 不需要额外设置,但是有时不稳定,另外本地运行时 busuanzi 显示统计数据很大属于正常现象,部署后会正常
# Data source. If use leancloud, you need to set the parameter in `web_analytics: leancloud`
# Options: busuanzi | leancloud
source: "leancloud"
pv_format: "总访问量 {} 次"
uv_format: "总访客数 {} 人"
views:
enable: true
# 统计数据来源
# Data Source
# Options: busuanzi | leancloud
source: "leancloud"
format: "{} 次"