搭建自己的技术博客系列3:让你的博客拥有评论功能!( 六 )


   if (infoEle && infoEle.childNodes && infoEle.childNodes.length > 0){
     infoEle.childNodes.forEach(function(item) {
       item.parentNode.removeChild(item);
     );
   
 </script>
{% endif %

\n

然后我们去主题配置文件中进行修改
主题配置文件路径:next_config.yml
找到以下参数进行修改

\n

valine:
 enable: true //打开valine评论功能
 appid: 你的leancloud appid
 appkey: 你的leancloud appkey
 notify: false //邮件提醒
 verify: true //评论时是否有验证码 , 需要在Leancloud 设置->安全中心 中打开
 placeholder: 说点什么吧! //评论框默认显示
 avatar: hide //评论者的头像我这里设置的不显示
 guest_info: nick # custom comment header
 pageSize: 10 # pagination size

\n

我的配置文件

推荐阅读