hugo-next / hugo-theme-next

Easily & powerful theme for Hugo engine.
https://hugo-next.eu.org
MIT License
214 stars 38 forks source link

waline pageview不可加载 #41

Closed finisky closed 1 year ago

finisky commented 2 years ago

请按照此 Issue 模版提供相关信息,例如源码仓库、网站链接和屏幕截图,这将有助于我们进行调查。 (Please follow this Issue template to provide relevant information, such as source code repository, website URL and screenshots, which will help us investigate.)

问题自检列表 (Issue Checklist)

请确认如下情况已检查,并将 [ ] 换成 [x] 来选择 (Change [ ] to [x] to selected which your could make sure)


预期行为 (Expected behavior)

请描述你想实现的预期效果 (Please describe the expected behavior what you want) 正确加载pageview count

实际行为 (Actual behavior)

请同时提供网站链接、屏幕截图和源码地址 (Please provide your site links, screenshots and code repository) image

问题重现步骤 (Steps to reproduce the behavior)

waline开启pageview,views不可加载,直到滑动页面到底部,waline comment加载成功之后view count才可加载成功。应该是waline懒加载导致的问题,可能的解决方案是单独加载waline pageview js

环境信息 (Environment Information)

主题配置(Configuration)

提供主题 config.yaml 中修改过的部分内容 (Paste ONLY CHANGED CONFIGURATION from config.yaml)

 waline:
    serverURL: https://xxx.vercel.app
    cssUrl: https://unpkg.com/@waline/client@v2/dist/waline.css
    pageSize: 10 # Pagination size
    lang: en-US
    commentCount: true
    pageView: true
    wordLimit: 200
    requiredMeta: ['nick', 'mail']

其他有用信息 (Other Information)

例如:操作系统、浏览器等 (e.g. Browser, System)

elkan1788 commented 2 years ago

注意约定的开发逻辑是,除了用户自定义JS和CSS外,其它依赖库的JS和CSS均不要在配置文件中体现,统一使用 data/resources.yaml 来管理。

finisky commented 2 years ago

贵站所有页面的浏览次数也加载不出来了,也无法留言评论,不知道跟你waline有升级到2.6.3有无关系。这提的issue是waline懒加载引起的问题。

elkan1788 commented 2 years ago

不是升级的问题,是vercel网络问题引起的,有时候会不稳定,估计还是leancloud的那个政策影响。