From 7076331b2adcceed57cf6064e1b9b99e035e9455 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 3e258b3269..e4775d96bd 100644 --- a/_config.yml +++ b/_config.yml @@ -494,7 +494,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 @@ -503,6 +503,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 96530b51d7..81cc569867 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) %}