diff --git a/_config.yml b/_config.yml index abc84c6..1f5e2d4 100644 --- a/_config.yml +++ b/_config.yml @@ -62,6 +62,18 @@ gitment: id: secret: +# If you want to use valine,you should get the appId and appKey form https://leancloud.cn ,more setting please see https://valine.js.org +valine: + enable: false # !!if you want use valine comment system,please set enable: true + appId: #your leancloud appId + appKey: #your leancloud appKey + guest_info: nick,mail,link #valine comment header info + placeholder: Just go go # valine comment input placeholder(like: Please leave your footprints ) + avatar: mm # gravatar style https://valine.js.org/avatar + pageSize: 10 # comment list page size + verify: false # valine verify code (true/false) + notify: false # valine mail notify (true/false) + lang: zh-cn # Donate donate: diff --git a/layout/_partial/after-footer.ejs b/layout/_partial/after-footer.ejs index 607636d..cc81d1a 100644 --- a/layout/_partial/after-footer.ejs +++ b/layout/_partial/after-footer.ejs @@ -30,6 +30,31 @@ <% } %> +<% if (theme.valine.enable && theme.valine.appId && theme.valine.appKey){ %> + + + +<% } %> + diff --git a/layout/_partial/article.ejs b/layout/_partial/article.ejs index 4527744..7efccb2 100644 --- a/layout/_partial/article.ejs +++ b/layout/_partial/article.ejs @@ -77,3 +77,9 @@ <% } %> + +<% if(!index && post.comments && theme.valine.enable && theme.valine.appId && theme.valine.appKey){ %> +
+
+
+<% } %>