Skip to content

Commit

Permalink
Update valine comment system version (theme-next#345)
Browse files Browse the repository at this point in the history
* Update valine comment system version

* Update valine visitor annotation

* Update valine instruction
  • Loading branch information
xCss authored and Jona-lee committed Oct 10, 2018
1 parent dd3e601 commit f3561cb
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ changyan:
# You can get your appid and appkey from https://leancloud.cn
# more info please open https://valine.js.org
valine:
enable: false
enable: false # When enable is set to be true, leancloud_visitors is recommended to be closed for the re-initialization problem within different leancloud adk version.
appid: # your leancloud application appid
appkey: # your leancloud application appkey
notify: false # mail notifier , https://github.com/xCss/Valine/wiki
Expand All @@ -508,6 +508,7 @@ valine:
avatar: mm # gravatar style
guest_info: nick,mail,link # custom comment header
pageSize: 10 # pagination size
visitor: false # leancloud-counter-security is not supported for now. When visitor is set to be true, appid and appkey are recommended to be the same as leancloud_visitors' for counter compatibility. Article reading statistic https://valine.js.org/visitor.html


# Support for youyan comments system.
Expand Down
2 changes: 1 addition & 1 deletion layout/_macro/post.swig
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@
{% endif %}

{# LeanCould PageView #}
{% if theme.leancloud_visitors.enable %}
{% if theme.leancloud_visitors.enable or (theme.valine.enable and theme.valine.appid and theme.valine.appkey and theme.valine.visitor) %}
<span id="{{ url_for(post.path) }}" class="leancloud_visitors" data-flag-title="{{ post.title }}">
<span class="post-meta-divider">|</span>
<span class="post-meta-item-icon">
Expand Down
2 changes: 1 addition & 1 deletion layout/_third-party/analytics/lean-analytics.swig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% if theme.leancloud_visitors.enable %}
{% if theme.leancloud_visitors.enable and !theme.valine.visitor %}

{# 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>
Expand Down
3 changes: 2 additions & 1 deletion layout/_third-party/comments/valine.swig
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@
appKey: '{{ theme.valine.appkey }}',
placeholder: '{{ theme.valine.placeholder }}',
avatar:'{{ theme.valine.avatar }}',
guest_info:guest,
meta:guest,
pageSize:'{{ theme.valine.pageSize }}' || 10,
visitor: {{ theme.valine.visitor }}
});
</script>
{% endif %}

0 comments on commit f3561cb

Please sign in to comment.