Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Update valine comment system version #345

Merged
merged 4 commits into from
Jul 14, 2018
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,7 @@ valine:
avatar: mm # gravatar style
guest_info: nick,mail,link # custom comment header
pageSize: 10 # pagination size
visitor: false # 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 %}