diff --git a/_config.yml b/_config.yml index 9557a9a..629e084 100644 --- a/_config.yml +++ b/_config.yml @@ -605,13 +605,16 @@ changyan: # For more information: https://valine.js.org, https://github.com/xCss/Valine valine: enable: false - appid: # Your leancloud application appid - appkey: # Your leancloud application appkey + appId: # Your leancloud application appid + appKey: # Your leancloud application appkey notify: false # Mail notifier verify: false # Verification code placeholder: Just go go # Comment box placeholder avatar: mm # Gravatar style - guest_info: nick,mail,link # Custom comment header + meta: # Custom comment header + - nick + - mail + - link pageSize: 10 # Pagination size language: # Language, available values: en, zh-cn visitor: false # Article reading statistic diff --git a/layout/_macro/post.njk b/layout/_macro/post.njk index 58284a2..376cb4f 100644 --- a/layout/_macro/post.njk +++ b/layout/_macro/post.njk @@ -97,7 +97,7 @@ {%- endif %} {# LeanCloud PageView #} - {%- if theme.leancloud_visitors.enable or (theme.valine.enable and theme.valine.appid and theme.valine.appkey and theme.valine.visitor) %} + {%- if theme.leancloud_visitors.enable or (theme.valine.enable and theme.valine.appId and theme.valine.appKey and theme.valine.visitor) %} diff --git a/layout/_third-party/comments/valine.njk b/layout/_third-party/comments/valine.njk index e1ec890..a664e0d 100644 --- a/layout/_third-party/comments/valine.njk +++ b/layout/_third-party/comments/valine.njk @@ -3,27 +3,11 @@ diff --git a/scripts/filters/comment/valine.js b/scripts/filters/comment/valine.js index 4df366c..041fbff 100644 --- a/scripts/filters/comment/valine.js +++ b/scripts/filters/comment/valine.js @@ -8,7 +8,7 @@ const { iconText } = require('./common'); // Add comment hexo.extend.filter.register('theme_inject', injects => { let theme = hexo.theme.config; - if (!theme.valine.enable || !theme.valine.appid || !theme.valine.appkey) return; + if (!theme.valine.enable || !theme.valine.appId || !theme.valine.appKey) return; injects.comment.raw('valine', '
', {}, {cache: true}); @@ -19,7 +19,7 @@ hexo.extend.filter.register('theme_inject', injects => { // Add post_meta hexo.extend.filter.register('theme_inject', injects => { let theme = hexo.theme.config; - if (!theme.valine.enable || !theme.valine.appid || !theme.valine.appkey) return; + if (!theme.valine.enable || !theme.valine.appId || !theme.valine.appKey) return; injects.postMeta.raw('valine', ` {% if post.comments and (is_post() or theme.valine.comment_count) %}