Closed xCss closed 7 years ago
add valine comments system.
# Valine comments https://valine.js.org valine: appid: # your leancloud appid appkey: # your leancloud appkey notify: false # true/false:mail notify !!!Test,Caution. 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: false # true/false:verify code avatar: mm # avatar style https://github.com/xCss/Valine/wiki/avatar-setting-for-valine placeholder: Just go go # comment box placeholder
<% if(page.comments && theme.comments && theme.comments.valine && theme.comments.valine.appid && theme.comments.valine.appkey ){ %> <hr /> <h3><%- __('comment')%>:</h3> <div id="valine"></div> <script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script> <script src='//unpkg.com/valine@1.1.7/dist/Valine.min.js'></script> <script> new Valine({ el: '#valine' , notify:<%= theme.comments.valine.notify %>, verify:<%= theme.comments.valine.verify %>, app_id: '<%= theme.comments.valine.appid %>', app_key: '<%= theme.comments.valine.appkey %>', placeholder: '<%= theme.comments.valine.placeholder %>', path:window.location.pathname, avatar:'<%= theme.comments.valine.avatar %>' }); </script> <% } %>
谢谢
:smile: 客气~
add valine comments system.
_config.yml:
layout/_partial/comments.ejs: