Valine Comments BeanTech hexo based on the theme of implementation.
-
Leancloud Configuration
First, visit the official website Leancloud
https://leancloud.cn/
have Github account of small partners can log in with Github account and then bind the mailbox can be friends!
Click Create application after entering
Into the Applications -> Settings -> Application key
-
Download Valine.min.js
First, download the latest
Valine.min.js
core code library to the local (Here is the link)
https://cdn.jsdelivr.net/npm/[email protected]/dist/
Right-clickValine.min.js
to select Save Link As can I put it here主题\source\js
below. -
Message configuration
In the thems\你的主题\layout\_partial\footer.ejs
below added to the appropriate position
<% if (is_post()) { %>
<script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
<!--Valine 的核心代码库:-->
<script src="../../js/Valine.min.js"></script>
<div class="comment"></div>
<script>
new Valine({
// AV 对象来自上面引入av-min.js(老司机们不要开车➳♡゛扎心了老铁)
av: AV,
el: '.comment', //
notify: true, // 邮件提醒!!!
verify: true, // 验证码
app_id: 'xxxxxx', // 这里填写上面得到的APP ID
app_key: 'xxxxxxx', // 这里填写上面得到的APP KEY
placeholder: '欢迎留言评论' // [v1.0.7 new]留言框占位提示文字
});
</script>
<% } %>
<% If (is_post ()) {%> <%}%> indicates whether the article is determined that the page not comment box is not displayed.
-
Open mail notification
Enter
Leancloud
> Choose your comments are stored应用
> Settings>邮件模板
, press the map set用于重置密码的邮件主题
> and then保存
:Note : Please note that the Edit link for you
博客
or网站首页
.<p>Hi, {{username}}</p> <p> 你在 {{appname}} 的评论收到了新的回复,请点击查看: </p> <p><a href="你的网址首页链接" style="display: inline-block; padding: 10px 20px; border-radius: 4px; background-color: #3090e4; color: #fff; text-decoration: none;">马上查看</a></p>