Skip to content

Commit

Permalink
新增了来必力评论支持
Browse files Browse the repository at this point in the history
  • Loading branch information
blinkfox committed Oct 20, 2018
1 parent e367beb commit 1770e1b
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
6 changes: 6 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,12 @@ disqus:
enable: false
shortname:

# Livere comment configuration, the default is not activated
# Livere 来必力评论模块的配置,默认为不激活
livere:
enable: false
uid:

# Whether to display fork me on github icon and link, default true, You can change it to your repo address
# 配置是否在 header 中显示 fork me on github 的图标,默认为true,你可以修改为你的仓库地址.
githubLink:
Expand Down
21 changes: 21 additions & 0 deletions layout/_partial/livere.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<div class="livere-card card" data-aos="fade-up">
<!-- 来必力City版安装代码 -->
<div id="lv-container" class="card-content" data-id="city" data-uid="<%- theme.livere.uid %>">
<script type="text/javascript">
(function (d, s) {
let 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版安装代码已完成 -->
</div>
4 changes: 4 additions & 0 deletions layout/_partial/post-detail.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,9 @@
<%- partial('_partial/disqus') %>
<% } %>

<% if (theme.livere && theme.livere.enable) { %>
<%- partial('_partial/livere') %>
<% } %>

<%- partial('_partial/prev-next') %>
</div>

0 comments on commit 1770e1b

Please sign in to comment.