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

Optimize the loading of comment counter [solved] #271

Closed
3 tasks done
icecory opened this issue May 4, 2018 · 3 comments
Closed
3 tasks done

Optimize the loading of comment counter [solved] #271

icecory opened this issue May 4, 2018 · 3 comments

Comments

@icecory
Copy link

icecory commented May 4, 2018

I agree and want to create new issue

on my blog ,comment limit loading rate of sit, that maybe also for many users.
although some comment plug-in not block the main thread on page showing, it still load and a loading icon show on chrome status bar. others plug-in even block the page showing.
i used gitment,youyan,changyan,LiveRe , now i used valine,

  1. comment counter default loading on homepage.
    i think there should be a option to control the comment counter plug-in in homepage also postpage.
    if i set show 5 post in homepage , there will be 10 http requests, and cdn won't work on it;
    screenshot from 2018-05-04 12-24-57

  2. some js file url should write in _config.yml such as

    {% if theme.valine.enable and theme.valine.appid and theme.valine.appkey %}
    <script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
    {% set valine_uri = '//unpkg.com/valine/dist/Valine.min.js' %}

    {# custom analytics part create by xiamo; edited by LEAFERx #}
    <script src="https://cdn1.lncld.net/static/js/av-core-mini-0.6.4.js"></script>
    <script>AV.initialize("{{theme.leancloud_visitors.app_id}}", "{{theme.leancloud_visitors.app_key}}");</script>

    cdn1.lncld.net is really slow

@stale
Copy link

stale bot commented Jul 11, 2018

This issue has been automatically marked as stale because lack of recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Stale label Jul 11, 2018
@ivan-nginx ivan-nginx changed the title optimize the loading of comment Optimize the loading of comment counter Dec 16, 2018
@stevenjoezhang
Copy link
Contributor

For the second question, maybe we can use jsdelivr CDN:
//cdn.jsdelivr.net/npm/leancloud-storage@3.11.0/dist/av-min.js

@ivan-nginx ivan-nginx changed the title Optimize the loading of comment counter Optimize the loading of comment counter [solved] Mar 4, 2019
tongluyang pushed a commit to tongluyang/hexo-theme-next that referenced this issue Nov 19, 2019
tongluyang pushed a commit to tongluyang/hexo-theme-next that referenced this issue Nov 19, 2019
* Fix theme-next#271 comment counter

* Update _config.yml

* Update lean-analytics.swig

* Update lean-analytics.swig

* Update post.swig

* add this
@lock
Copy link

lock bot commented Mar 17, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. It is possible issue was solved or at least outdated. Feel free to open new for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Mar 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants