From cc323eb1cdcf08f047510e6e11ebaaae0c96a8f0 Mon Sep 17 00:00:00 2001 From: Zerone Date: Sat, 2 Feb 2019 01:42:22 +0800 Subject: [PATCH] valine-visitor&config --- _config.yml | 2 ++ _includes/comments-providers/valine.html | 17 +++++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/_config.yml b/_config.yml index a76d808b288..fcac22e189a 100644 --- a/_config.yml +++ b/_config.yml @@ -140,6 +140,8 @@ comments: app_id : # LeanCloud App id app_key : # LeanCloud App key placeholder : # Prompt information + visitor : # false (default) + meta : # "[nick, mail, link]" (default) nickname, E-mail, Personal-site ## => Pageview diff --git a/_includes/comments-providers/valine.html b/_includes/comments-providers/valine.html index abe627ce64c..68a42748bd3 100644 --- a/_includes/comments-providers/valine.html +++ b/_includes/comments-providers/valine.html @@ -4,13 +4,20 @@ {%- assign _VALINE_APP_ID = site.comments.valine.app_id -%} {%- assign _VALINE_APP_KEY = site.comments.valine.app_key -%} {%- assign _VALINE_PLACEHOLDER = site.comments.valine.placeholder -%} +{%- assign _VALINE_VISITOR = site.comments.valine.visitor -%} +{%- assign _VALINE_META = site.comments.valine.meta -%} -{%- if page.key and - _VALINE_APP_ID and +{%- if _VALINE_APP_ID and _VALINE_APP_KEY -%}
+ +{%- if _VALINE_VISITOR -%} + + +{%- endif -%} +