From 608f8221a70f7c23286a0376560c3cb0f2ec11c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=91=89=E7=9C=9F?= Date: Tue, 1 Oct 2019 14:06:48 +0800 Subject: [PATCH] Add some new configuration item --- _config.yml | 2 ++ layout/_third-party/comments/valine.swig | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/_config.yml b/_config.yml index 8c3f125b7e..07931a4c4f 100644 --- a/_config.yml +++ b/_config.yml @@ -662,6 +662,8 @@ valine: language: # Language, available values: en, zh-cn 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 comment_count: true # If false, comment count will only be displayed in post page, not in home page + recordIP: false # Whether to record the commenter IP + serverURLs: # When the custom domain name is enabled, fill it in here (it will be detected automatically by default, no need to fill in) #post_meta_order: 0 # LiveRe comments system diff --git a/layout/_third-party/comments/valine.swig b/layout/_third-party/comments/valine.swig index 7f643cdf04..f1be2f5e07 100644 --- a/layout/_third-party/comments/valine.swig +++ b/layout/_third-party/comments/valine.swig @@ -19,7 +19,9 @@ NexT.utils.getScript('{{ valine_uri }}', () => { pageSize: '{{ theme.valine.pageSize }}' || 10, visitor: {{ theme.valine.visitor }}, lang: '{{ theme.valine.language }}' || 'zh-cn', - path: location.pathname + path: location.pathname, + recordIP: {{ theme.valine.recordIP }}, + serverURLs: '{{ theme.valine.serverURLs }}' }); }, window.Valine);