add livere comment plugin support (#274)
parent
9ed876f49e
commit
451198931d
|
@ -64,6 +64,7 @@ comment:
|
||||||
#Register an OAuth application, and you will get a client ID and a client secret.
|
#Register an OAuth application, and you will get a client ID and a client secret.
|
||||||
client_id: #your client ID
|
client_id: #your client ID
|
||||||
client_secret: #your client secret
|
client_secret: #your client secret
|
||||||
|
livere: # enter livere uid here
|
||||||
|
|
||||||
# Share
|
# Share
|
||||||
share: default # options: jiathis, bdshare, addtoany, default
|
share: default # options: jiathis, bdshare, addtoany, default
|
||||||
|
|
|
@ -11,5 +11,7 @@
|
||||||
<a href="<%= post.permalink %>#comments" class="article-comment-link"><span class="fb-comments-count" data-href="<%= post.permalink %>">0</span> <%= __('article.comments') %></a>
|
<a href="<%= post.permalink %>#comments" class="article-comment-link"><span class="fb-comments-count" data-href="<%= post.permalink %>">0</span> <%= __('article.comments') %></a>
|
||||||
<% } else if (theme.comment.changyan && theme.comment.changyan.appid && theme.comment.changyan.conf) { %>
|
<% } else if (theme.comment.changyan && theme.comment.changyan.appid && theme.comment.changyan.conf) { %>
|
||||||
<a href="<%= post.permalink %>#comments" id="sourceId::<%= post.path %>" class="article-comment-link cy_cmt_count"><%= __('article.comments') %></a>
|
<a href="<%= post.permalink %>#comments" id="sourceId::<%= post.path %>" class="article-comment-link cy_cmt_count"><%= __('article.comments') %></a>
|
||||||
|
<% } else if (theme.comment.livere) { %>
|
||||||
|
<a href="<%- post.permalink %>#comments" class="article-comment-link"><%= __('article.comments') %></a>
|
||||||
<% } %>
|
<% } %>
|
||||||
<% } %>
|
<% } %>
|
|
@ -11,6 +11,8 @@
|
||||||
<section id="comments"><%- partial('comment/isso') %></section>
|
<section id="comments"><%- partial('comment/isso') %></section>
|
||||||
<% } else if (theme.comment.changyan && theme.comment.changyan.appid && theme.comment.changyan.conf) { %>
|
<% } else if (theme.comment.changyan && theme.comment.changyan.appid && theme.comment.changyan.conf) { %>
|
||||||
<section id="comments"><%- partial('comment/changyan') %></section>
|
<section id="comments"><%- partial('comment/changyan') %></section>
|
||||||
|
<% } else if (theme.comment.livere) { %>
|
||||||
|
<section id="comments"><%- partial('comment/livere') %></section>
|
||||||
<% } else if (theme.comment.gitment) { %>
|
<% } else if (theme.comment.gitment) { %>
|
||||||
<section id="comments"><%- partial('comment/gitment') %></section>
|
<section id="comments"><%- partial('comment/gitment') %></section>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
<% if (typeof(script) !== 'undefined' && script) { %>
|
||||||
|
|
||||||
|
<!-- 来必力City版安装代码 -->
|
||||||
|
<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>
|
||||||
|
<!-- City版安装代码已完成 -->
|
||||||
|
|
||||||
|
<% } else { %>
|
||||||
|
<div id="lv-container" data-id="city" data-uid=<%= theme.comment.livere %>></div>
|
||||||
|
<% } %>
|
|
@ -16,4 +16,6 @@
|
||||||
theme.comment.gitment.client_id &&
|
theme.comment.gitment.client_id &&
|
||||||
theme.comment.gitment.client_secret) { %>
|
theme.comment.gitment.client_secret) { %>
|
||||||
<%- partial('comment/gitment', { script: true }) %>
|
<%- partial('comment/gitment', { script: true }) %>
|
||||||
|
<% } else if (theme.comment.livere) { %>
|
||||||
|
<%- partial('comment/livere', { script: true }) %>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
Loading…
Reference in New Issue