diff --git a/_config.yml b/_config.yml index d325d44c44..699b2ea42d 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);