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

如何在jekyll博客的index.html页面显示所有博客的阅读量统计结果? #136

Closed
oukohou opened this issue Dec 6, 2018 · 8 comments
Labels

Comments

@oukohou
Copy link

@oukohou oukohou commented Dec 6, 2018

问题:

首先声明一下我前端无能~~

然后是参照你的博客主页,也想把index页面每篇博客的阅读量都统计显示在index页面,然后努力试着理解我的博客的index.html源码并改写,最终实现的情况如图:
image


只显示了阅读量三个字,不像每一篇博文里还会显示数字结果:
image

是不是index.html里还需要加些别的东西,不只是单单引入下面这几行:

<!-- 显示每篇博客阅读量, id 将作为查询条件 -->
 <span id={{post.url}} class="leancloud-visitors" data-flag-title={{post.title}}>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item-text">阅读量 </span>
    <span class="leancloud-visitors-count"></span>
</span>

以及,应该改成什么样子?
致礼!

@oukohou oukohou changed the title 如何在jekyll博客的index.html页面显示所有阅读量统计结果? 如何在jekyll博客的index.html页面显示所有博客的阅读量统计结果? Dec 6, 2018
@xCss

This comment has been minimized.

Copy link
Owner

@xCss xCss commented Dec 7, 2018

因为你没有在首页初始化Valine啊:

new Valine({
    // ...
})
@oukohou

This comment has been minimized.

Copy link
Author

@oukohou oukohou commented Dec 7, 2018

@xCss 谢谢,已解决。
致礼!

@oukohou

This comment has been minimized.

Copy link
Author

@oukohou oukohou commented Dec 7, 2018

solved,now close it.

@oukohou oukohou closed this Dec 7, 2018
@oukohou

This comment has been minimized.

Copy link
Author

@oukohou oukohou commented Aug 27, 2019

我的博客主页:oukohou,然后发现首页的阅读统计量全部为0了,而点进去每个页面是可以正确统计阅读量的,请问是什么原因?谢谢~~

@oukohou oukohou reopened this Aug 27, 2019
@xCss

This comment has been minimized.

Copy link
Owner

@xCss xCss commented Aug 27, 2019

@oukohou 首页只需要一个new Valine,而你每条数据都new了一个。。。

image

oukohou added a commit to oukohou/oukohou.github.io that referenced this issue Aug 27, 2019
…for details.

Signed-off-by: oukohou <oukohou@outlook.com>
@oukohou

This comment has been minimized.

Copy link
Author

@oukohou oukohou commented Aug 27, 2019

@xCss 已经修改为只有一个new Valine了但是依然全部为0。。
image

@xCss

This comment has been minimized.

Copy link
Owner

@xCss xCss commented Aug 27, 2019

@oukohou OK,感谢反馈,已复现BUG,将在下个版本修复。

@xCss xCss added bug next labels Aug 27, 2019
@xCss

This comment has been minimized.

Copy link
Owner

@xCss xCss commented Aug 29, 2019

@oukohou 已修复,参考 v1.3.10

@xCss xCss closed this Aug 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.