Skip to content

Commit

Permalink
New Valine options (#1193)
Browse files Browse the repository at this point in the history
* recordIP & serverURLs
  • Loading branch information
kuretru authored and 1v9 committed Oct 1, 2019
1 parent cb5123e commit 67fa917
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion layout/_third-party/comments/valine.swig
Original file line number Diff line number Diff line change
Expand Up @@ -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);
</script>

0 comments on commit 67fa917

Please sign in to comment.