hexo-theme-raytaylorism
hexo-theme-raytaylorism copied to clipboard
能否添加LiveRe(来必力)评论?
在themes/raytaylorism/layout/_partial/plugin/comment.ejs中底部,最后一行换成:
<% } else if (theme.lbl_product_key && page.comments){ %>
<!-- 来必力City版安装代码 -->
<div id="lv-container" data-id="city" data-uid="<%= theme.lbl_product_key %>" style="color: #D60036;text-align: center">
<script type="text/javascript">
(function(d, s) {
var j, e = d.getElementsByTagName(s)[0];
if (typeof LivereTower === 'function') { return; }
j = d.createElement(s);
j.src = 'https://cdn-city.livere.com/js/embed.dist.js';
j.async = true;
e.parentNode.insertBefore(j, e);
})(document, 'script');
</script>
<noscript> 为正常使用来必力评论功能请激活JavaScript</noscript>
</div>
<!-- City版安装代码已完成 -->
<% } %>
然后在themes/raytaylorism/_config.yml中添加 lbl_product_key: '来必力上生成的key'
确保所有留言中lbl配置key,其他留空