hexo Comments

Valine Comments BeanTech hexo based on the theme of implementation.

  1. 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

Here Insert Picture Description

Into the Applications -> Settings -> Application key

Here Insert Picture Description

  1. Download Valine.min.js

    First, download the latest Valine.min.jscore code library to the local (Here is the link)
    https://cdn.jsdelivr.net/npm/[email protected]/dist/
    Right-click Valine.min.jsto select Save Link As can I put it here 主题\source\jsbelow.

  2. Message configuration

In the thems\你的主题\layout\_partial\footer.ejsbelow 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.

  1. 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>
    

Welcome to my personal blog

Published 26 original articles · won praise 27 · views 6865

Guess you like

Origin blog.csdn.net/qq_40705355/article/details/100034140