🔥 remove: minivaline

This commit is contained in:
shenyu 2020-06-02 20:48:42 +08:00
parent 05af377fa9
commit fb2dbe73a2
3 changed files with 4 additions and 57 deletions

View File

@ -112,19 +112,19 @@ layout:
article_width: 80rem
sidebar_width: 8rem
# 评论1、Valine(推荐)2、Gitalk3、MiniValine
# 评论1、Valine(推荐)2、Gitalk
# 1、Valine[一款快速、简洁且高效的无后端评论系统](https://github.com/xCss/Valine)
# 启用Valine必须先创建leancloud应用 获取 id|key 填入即可
leancloud:
enable: true
app_id: #
app_key: #
app_id: chaSYi8FMdJBwzIBpxeNjqWC-gzGzoHsz
app_key: PqqkLYgPkHvH1BmyQqySWnSK
# Valine配置
valine:
enable: true # 是否启用
verify: false # 是否启用防垃圾验证
notify: false # 是否开启邮件提醒(https://valine.js.org/notify.html)
notify: true # 是否开启邮件提醒(https://valine.js.org/notify.html)
avatar: monsterid # 头像样式(https://valine.js.org/avatar.html)
placeholder: 给我的文章加点评论吧~ # placeholder

View File

@ -82,8 +82,4 @@
<%- partial('post/gitalk') %>
<% } %>
<% if (theme.minivaline && theme.minivaline.enable && !post.no_minivaline){ %>
<%- partial('post/minivaline') %>
<% } %>
</article>

View File

@ -1,49 +0,0 @@
<% if (!index && theme.leancloud && theme.leancloud.enable){ %>
<!-- minivaline评论 -->
<div id="mvcomments-box">
<div id="mvcomments">
</div>
</div>
<script src='https://cdn.jsdelivr.net/npm/minivaline/dist/MiniValine.min.js'></script>
<script>
new MiniValine({
el: '#mvcomments',
appId: '<%- theme.leancloud.app_id %>',
appKey: '<%- theme.leancloud.app_key %>',
placeholder: '<%- theme.minivaline.placeholder %>',
lang: '<%- theme.minivaline.lang %>',
adminEmailMd5: '<%- theme.minivaline.adminEmailMd5 %>',
math: <%- theme.minivaline.math %>,
md: <%- theme.minivaline.md %>
});
const infoEle = document.querySelector('#mvcomments .info');
if (infoEle && infoEle.childNodes && infoEle.childNodes.length > 0) {
infoEle.childNodes.forEach(function (item) {
item.parentNode.removeChild(item);
});
}
</script>
<style>
#mvcomments-box {
padding: 5px 30px;
}
@media screen and (max-width: 800px) {
#mvcomments-box {
padding: 5px 0px;
}
}
#mvcomments-box #mvcomments {
background-color: #fff;
}
.v .vlist .vcard .vh {
padding-right: 20px;
}
.v .vlist .vcard {
padding-left: 10px;
}
</style>
<% } %>