Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

不蒜子文章访问数统计错误的问题 #185

Closed
cdcq opened this issue Apr 14, 2021 · 1 comment
Closed

不蒜子文章访问数统计错误的问题 #185

cdcq opened this issue Apr 14, 2021 · 1 comment
Labels
🔌 3rd Party Service Third party service

Comments

@cdcq
Copy link

cdcq commented Apr 14, 2021

问题描述

现在不蒜子 js 的 cdn 的默认地址 "//cdn.jsdelivr.net/gh/sukkaw/busuanzi@latest/bsz.pure.mini.js" 功能不正常,会造成整个博客的访问数完全一致的情况。这种情况不仅出现在我的博客,还出现在 stun 主要开发者 liuyib 的博客上 233 。

下图为 liuyib 的博客截图。可以看到,不同文章的访问数完全一致,并且同步增加。(每次加 2 是因为我先回到主页,再点击另一篇文章,造成 2 次访问)

image

image

image

复现方法

只要在 stun/_config.yml 中把 busuanzi 的 cdn 地址改为 "//cdn.jsdelivr.net/gh/sukkaw/busuanzi@latest/bsz.pure.mini.js" ,再访问你的博客就可以看到啦。

推荐的解决方案

jsdelivr 上的另一个 cdn "//cdn.jsdelivr.net/npm/busuanzi@latest/bsz.pure.mini.js" 也有此问题。

目前我的解决方案是使用不蒜子官方 js 地址 "//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js“ 。

这样可能会导致大陆浏览速度变慢,需要用户根据需求进行取舍。

此外,如果你更改了地址后仍然没有解决问题,请清理你的浏览器缓存并再次尝试。

@liuyib
Copy link
Owner

liuyib commented May 3, 2021

@cdcq 很感谢你的反馈,这个问题存在好长时间了,我也发现了,但是一直没精力去追究原因,毕竟一个主题依赖的第三方东西太多了。

当然,stun 主题替换 CDN 地址很简单,配置里都提供了,比如替换不蒜子的 CDN,找到配置:

cdn:
  busuanzi: # 你要替换的 CDN 地址

直接替换就好了。

最后再次感谢你的反馈,帮了我一个大忙 ❤️。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔌 3rd Party Service Third party service
Projects
None yet
Development

No branches or pull requests

2 participants