From f3561cb7fc35ed7457c331c7d5c2be8b1da9177f Mon Sep 17 00:00:00 2001 From: Nine Date: Sat, 14 Jul 2018 21:55:41 +0800 Subject: [PATCH] Update valine comment system version (#345) * Update valine comment system version * Update valine visitor annotation * Update valine instruction --- _config.yml | 3 ++- layout/_macro/post.swig | 2 +- layout/_third-party/analytics/lean-analytics.swig | 2 +- layout/_third-party/comments/valine.swig | 3 ++- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/_config.yml b/_config.yml index 700afeed22..8d2e4db197 100644 --- a/_config.yml +++ b/_config.yml @@ -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 @@ -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. diff --git a/layout/_macro/post.swig b/layout/_macro/post.swig index 0e3745ad51..c0c2f993a6 100644 --- a/layout/_macro/post.swig +++ b/layout/_macro/post.swig @@ -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) %}