diff --git a/_config.yml.example b/_config.yml.example index f9a6819..9529314 100644 --- a/_config.yml.example +++ b/_config.yml.example @@ -50,7 +50,7 @@ search: # Comment comment: - disqus: hexo-theme-icarus # enter disqus shortname here + disqus: # enter disqus shortname here duoshuo: # enter duoshuo shortname here youyan: # enter youyan uid here facebook: # enter true to enable @@ -65,6 +65,14 @@ comment: client_id: #your client ID client_secret: #your client secret livere: # enter livere uid here + valine: # Valine Comment System https://github.com/xCss/Valine + on: # enter true to enable + appId: # enter the leancloud application appId here + appKey: # enter the leancloud application appKey here + notify: # enter true to enable https://github.com/xCss/Valine/wiki/Valine-%E8%AF%84%E8%AE%BA%E7%B3%BB%E7%BB%9F%E4%B8%AD%E7%9A%84%E9%82%AE%E4%BB%B6%E6%8F%90%E9%86%92%E8%AE%BE%E7%BD%AE + verify: # enter true to enable + placeholder: Just Do It # enter the comment box placeholder + # Share share: default # options: jiathis, bdshare, addtoany, default diff --git a/layout/comment/index.ejs b/layout/comment/index.ejs index a5c9e8d..3cf1eb2 100644 --- a/layout/comment/index.ejs +++ b/layout/comment/index.ejs @@ -13,6 +13,10 @@
<%- partial('comment/changyan') %>
<% } else if (theme.comment.livere) { %>
<%- partial('comment/livere') %>
+ <% } else if (theme.comment.valine.on && + theme.comment.valine.appId && + theme.comment.valine.appKey) { %> +
<%- partial('comment/valine') %>
<% } else if (theme.comment.gitment && theme.comment.gitment.owner && theme.comment.gitment.repo && diff --git a/layout/comment/scripts.ejs b/layout/comment/scripts.ejs index 58d75d9..3c65e69 100644 --- a/layout/comment/scripts.ejs +++ b/layout/comment/scripts.ejs @@ -18,4 +18,8 @@ <%- partial('comment/gitment', { script: true }) %> <% } else if (theme.comment.livere) { %> <%- partial('comment/livere', { script: true }) %> +<% } else if (theme.comment.valine.on && + theme.comment.valine.appId && + theme.comment.valine.appKey) { %> + <%- partial('comment/valine', { script: true }) %> <% } %> diff --git a/layout/comment/valine.ejs b/layout/comment/valine.ejs new file mode 100644 index 0000000..13f3691 --- /dev/null +++ b/layout/comment/valine.ejs @@ -0,0 +1,16 @@ +<% if (typeof(script) !== 'undefined' && script) { %> + + + +<% } else { %> +
+<% } %> \ No newline at end of file