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

valine显示阅读量在首页无效问题 #54

Open
Oguri-Chen opened this issue Jul 20, 2020 · 1 comment
Open

valine显示阅读量在首页无效问题 #54

Oguri-Chen opened this issue Jul 20, 2020 · 1 comment

Comments

@Oguri-Chen
Copy link

将common-article.ejs里的不蒜子计数改成valine后可以正常显示阅读量
但是在index-items.ejs的

<div class="post-meta"></div>

里面插入

<span id='/<%= post.path %>' class="leancloud_visitors" data-flag-title="<%= post.title %>">
    <i class="far fa-eye"></i>
    <a href="/<%= post.path %>" class="leancloud-visitors-count"></a>
</span>

后,首页无法正常显示阅读量,刷新也没用,但从别的页面回到主页就能正常显示了
先去首页(不显示)——>跳转/comment页面——>回到首页(显示)
直接进入/comment页面——>回到首页(显示)
演示博客

@Oguri-Chen
Copy link
Author

目前在footer.ejs里加了

$('.logolink a')[0].click();

来模拟一次刷新页面,能治标了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant