yuang01 / hexo-theme-bamboo

Hexo博客主题,功能强大,美观
https://hexo-theme-bamboo.netlify.app/
MIT License
414 stars 59 forks source link

阅读量好像有点bug,貌似不是计算单个文章的阅读量,而是所有文章 #29

Open zqzess opened 1 year ago

yuang01 commented 1 year ago

是单个文章的访问量吧,比如说 https://yuang01.github.io/post/hexo-theme-bamboo-new/https://yuang01.github.io/post/hexo-theme-bamboo/page/ 上面显示的阅读量就不一样,如果是所有文章阅读量的话,那么这两篇文章就应该阅读量相同

zqzess commented 1 year ago
image image image image image

你看一下这几张图片,它每点击一次都有增加一次访问量,每篇文章访问量误差基本都在1-2之间,这得有人打开这个网页看了所有文章才能实现,假设每人每篇只看一次,也就是说有一千多人打开这个网站每篇文章都看了一遍,这概率有点低啊

zqzess commented 1 year ago

这个应该是计算的这个网站的访问量,点一次或者刷新一次就算一次访问,而不是阅读量

zqzess commented 1 year ago

这个计算的应该也是有bug的,按理说同一ip短时间内多次访问或者刷新网站应该不重复计算,这个显然不是

zqzess commented 1 year ago

还有一个问题,友链页到底该咋写啊,我new page后,md文件内的layout设置为friends后编译会报错,使用GitHub生成那个 填写的文档里给的那个代码{% issues sites | api=https://api.github.com/repos/yuang01/friends/issues?sort=updated&state=open&page=1&per_page=100&labels=active %},编译后页面上就一直显示加载中,过后就加载失败

image image
yuang01 commented 1 year ago

image image 我这个访问量和你那个截图是不一样的,一个是29,一个是1298 这个用的是 https://github.com/willin/hexo-wordcount 这个插件 这个插件确实是进入一次页面,访问量就加一,同一个ip也会加一,只要进一次就加一

yuang01 commented 1 year ago

友情链接的话

---
title: friends
date: 2021-06-17 15:30:30
onlyTitle: true # 只显示title
toc: false # 不显示文章目录
# type: "friends" # 这个不要了
# layout: "friends" # 这个不要了
---

不用写layout: friends

zqzess commented 1 year ago

image image 我这个访问量和你那个截图是不一样的,一个是29,一个是1298 这个用的是 https://github.com/willin/hexo-wordcount 这个插件 这个插件确实是进入一次页面,访问量就加一,同一个ip也会加一,只要进一次就加一

那我这边就很奇怪了。。我看我自己的是这样,看你的博客也是这样

zqzess commented 1 year ago

友情链接的话

---
title: friends
date: 2021-06-17 15:30:30
onlyTitle: true # 只显示title
toc: false # 不显示文章目录
# type: "friends" # 这个不要了
# layout: "friends" # 这个不要了
---

不用写layout: friends

那友联页面加载github和gitee的那个一直加载中然后加载失败怎么解决啊

yuang01 commented 1 year ago

第一次就加载不出来吗?

zqzess commented 1 year ago

第一次就加载不出来吗?

是的,从没加载出来过

yuang01 commented 1 year ago

我的友情链接是在根目录下的source文件夹下创建huoban/index.md文件,内容如下

---
title: 友情链接
date: 2021-05-10 15:39:04
toc: false
img: https://pic1.zhimg.com/80/v2-a0debb6ed3dfcad3d32b04a659bd64e3_1440w.jpg
onlyTitle: true
---
## 友情链接
{% btns circle grid4 %}
  {% cell QQ头像, https://baidu.com, http://q1.qlogo.cn/g?b=qq&nk=1730241541&s=640 %}
  {% cell 随机动漫头像, https://baidu.com, http://api.btstu.cn/sjtx/api.php?lx=c1&format=images %}
  {% cell 随机男生头像, https://baidu.com, http://api.btstu.cn/sjtx/api.php?lx=a1&format=images %}
  {% cell 随机女生头像, https://baidu.com, http://api.btstu.cn/sjtx/api.php?lx=b1&format=images %}
  {% cell 随机动漫女头像, https://baidu.com, http://api.btstu.cn/sjtx/api.php?lx=c2&format=images %}
  {% cell 随机动漫男头像, https://baidu.com, http://api.btstu.cn/sjtx/api.php?lx=c3&format=images %}
  {% cell QQ头像, https://baidu.com, http://q1.qlogo.cn/g?b=qq&nk=1730241541&s=640 %}
  {% cell 随机动漫头像, https://baidu.com, http://api.btstu.cn/sjtx/api.php?lx=c1&format=images %}
  {% cell 随机男生头像, https://baidu.com, http://api.btstu.cn/sjtx/api.php?lx=a1&format=images %}
  {% cell 随机女生头像, https://baidu.com, http://api.btstu.cn/sjtx/api.php?lx=b1&format=images %}
  {% cell 随机动漫女头像, https://baidu.com, http://api.btstu.cn/sjtx/api.php?lx=c2&format=images %}
  {% cell 随机动漫男头像, https://baidu.com, http://api.btstu.cn/sjtx/api.php?lx=c3&format=images %}
{% endbtns %}

## 来自Github的小伙伴们
{% issues sites | api=https://api.github.com/repos/yuang01/friends/issues?sort=updated&state=open&page=1&per_page=100&labels=active %}

## 来自Gitee的小伙伴们
{% issues sites | api=https://gitee.com/api/v5/repos/yuang01/friends/issues?sort=updated&state=open&page=1&per_page=100&labels=active %}

> 请前往[https://github.com/yuang01/friends/issues](https://github.com/yuang01/friends/issues)仓库提交issue,申请友情链接

你看看这样能加载出来吗?

zqzess commented 1 year ago

我的友情链接是在根目录下的source文件夹下创建huoban/index.md文件,内容如下

---
title: 友情链接
date: 2021-05-10 15:39:04
toc: false
img: https://pic1.zhimg.com/80/v2-a0debb6ed3dfcad3d32b04a659bd64e3_1440w.jpg
onlyTitle: true
---
## 友情链接
{% btns circle grid4 %}
  {% cell QQ头像, https://baidu.com, http://q1.qlogo.cn/g?b=qq&nk=1730241541&s=640 %}
  {% cell 随机动漫头像, https://baidu.com, http://api.btstu.cn/sjtx/api.php?lx=c1&format=images %}
  {% cell 随机男生头像, https://baidu.com, http://api.btstu.cn/sjtx/api.php?lx=a1&format=images %}
  {% cell 随机女生头像, https://baidu.com, http://api.btstu.cn/sjtx/api.php?lx=b1&format=images %}
  {% cell 随机动漫女头像, https://baidu.com, http://api.btstu.cn/sjtx/api.php?lx=c2&format=images %}
  {% cell 随机动漫男头像, https://baidu.com, http://api.btstu.cn/sjtx/api.php?lx=c3&format=images %}
  {% cell QQ头像, https://baidu.com, http://q1.qlogo.cn/g?b=qq&nk=1730241541&s=640 %}
  {% cell 随机动漫头像, https://baidu.com, http://api.btstu.cn/sjtx/api.php?lx=c1&format=images %}
  {% cell 随机男生头像, https://baidu.com, http://api.btstu.cn/sjtx/api.php?lx=a1&format=images %}
  {% cell 随机女生头像, https://baidu.com, http://api.btstu.cn/sjtx/api.php?lx=b1&format=images %}
  {% cell 随机动漫女头像, https://baidu.com, http://api.btstu.cn/sjtx/api.php?lx=c2&format=images %}
  {% cell 随机动漫男头像, https://baidu.com, http://api.btstu.cn/sjtx/api.php?lx=c3&format=images %}
{% endbtns %}

## 来自Github的小伙伴们
{% issues sites | api=https://api.github.com/repos/yuang01/friends/issues?sort=updated&state=open&page=1&per_page=100&labels=active %}

## 来自Gitee的小伙伴们
{% issues sites | api=https://gitee.com/api/v5/repos/yuang01/friends/issues?sort=updated&state=open&page=1&per_page=100&labels=active %}

> 请前往[https://github.com/yuang01/friends/issues](https://github.com/yuang01/friends/issues)仓库提交issue,申请友情链接

你看看这样能加载出来吗?

我在本地试了一下加载不出来

image
yuang01 commented 1 year ago

那就奇了怪了,还有一种可能是,你访问我的友情链接页面过多,然后github会有请求限制,所以你的ip暂时不能访问请求github,所以加载不出来

zqzess commented 1 year ago

那就奇了怪了,还有一种可能是,你访问我的友情链接页面过多,然后github会有请求限制,所以你的ip暂时不能访问请求github,所以加载不出来

https://www.whitemoon.top/friends/这是我的友联地址,我找了2个同学试了一下,都加载不出来

zqzess commented 1 year ago

那就奇了怪了,还有一种可能是,你访问我的友情链接页面过多,然后github会有请求限制,所以你的ip暂时不能访问请求github,所以加载不出来

然后我是挂梯子的,应该不是ip问题,换过ip换过浏览器试过了

yuang01 commented 1 year ago

你的友情链接文件是在哪个目录下呢?内容是什么呢?

zqzess commented 1 year ago

你的友情链接文件是在哪个目录下呢?内容是什么呢?

source/friends/index.md

---
title: 友情链接
date: 2022-08-21 13:03:15
toc: false
onlyTitle: true
---
{% issues sites | api=<https://api.github.com/repos/zqzess/friends/issues?sort=updated&state=open&page=1&per_page=100&labels=active> %}
yuang01 commented 1 year ago

你写错了,应该是

{% issues sites | api=https://api.github.com/repos/zqzess/friends/issues?sort=updated&state=open&page=1&per_page=100&labels=active %}
yuang01 commented 1 year ago

中间没有那个尖括号

zqzess commented 1 year ago

中间没有那个尖括号

还是加载不出来

image
yuang01 commented 1 year ago

image 我的可以加载出来,内容如下

---
title: 友情链接
date: 2021-05-10 15:39:04
toc: false
img: https://pic1.zhimg.com/80/v2-a0debb6ed3dfcad3d32b04a659bd64e3_1440w.jpg
onlyTitle: true
---
## 友情链接

## 来自Github的小伙伴们
{% issues sites | api=https://api.github.com/repos/zqzess/friends/issues?sort=updated&state=open&page=1&per_page=100&labels=active %}

> 请前往[https://github.com/yuang01/friends/issues](https://github.com/yuang01/friends/issues)仓库提交issue,申请友情链接
yuang01 commented 1 year ago

你先本地测试环境看能不能加载出来,本地能出来,线上也就可以了

zqzess commented 1 year ago

你先本地测试环境看能不能加载出来,本地能出来,线上也就可以了

出不来,本地和线上都不行。我同学没挂梯子加载不出来,我挂梯子也加载不出来

zqzess commented 1 year ago

算了不管它了,只要代码没问题就行,说不定哪天就自己出来了

yuang01 commented 1 year ago

我真的能加载出来的,你那边不行的话,就换一种方法吧,咱不用github上的,直接写死,看这个文章 http://120.48.121.186/post/site-card/

yuang01 commented 1 year ago

用主题自带的 site-card 标签,写死也是阔以滴

zqzess commented 1 year ago

我去看看

zqzess commented 1 year ago

我真的能加载出来的,你那边不行的话,就换一种方法吧,咱不用github上的,直接写死,看这个文章 http://120.48.121.186/post/site-card/

image

如果单独访问那个图片链接是能看到的,但是写在这个里面它就加载不出来了

image
yuang01 commented 1 year ago

不会呀,你看我的网站就能看到图片呀

zqzess commented 1 year ago

不会呀,你看我的网站就能看到图片呀

我这加载不出来。。。

zqzess commented 1 year ago

算了我还是用GitHub那个,只要代码没问题,迟早能加载出来

yuang01 commented 1 year ago

你刚才那个写错了的,改了吗,就是多加了尖括号那个, 正确写法是这个

{% issues sites | api=https://api.github.com/repos/zqzess/friends/issues?sort=updated&state=open&page=1&per_page=100&labels=active %}

然后发布打线上的时候,先执行下面两条命令

heexo clean

hexo g

然后发布

zqzess commented 1 year ago

你刚才那个写错了的,改了吗,就是多加了尖括号那个, 正确写法是这个

{% issues sites | api=https://api.github.com/repos/zqzess/friends/issues?sort=updated&state=open&page=1&per_page=100&labels=active %}

然后发布打线上的时候,先执行下面两条命令

heexo clean

hexo g

然后发布

代码改了,也是先clean,再编译生成再发布的

zqzess commented 1 year ago

关于那个浏览量统计的,发现好像webkit内核的浏览器浏览量统计是有异常的