Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(comment): add livere comment system support. #381

Merged
merged 1 commit into from
Jun 7, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions _config.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -190,14 +190,16 @@ materialcdn:

# Comment Systems
# Available value of "use":
# disqus | disqus_click | changyan | 163gentie
# disqus | disqus_click | changyan | 163gentie | livere(laibili)
comment:
use:
shortname: # duoshuo or disqus shortname
changyan_appid:
changyan_conf:
changyan_thread_key_type: path
gentie_productKey:
gentie_productKey:
livere_type: # city or premium
livere_data_uid:

# Search Systems
# Available value:
Expand Down
Empty file.
10 changes: 10 additions & 0 deletions layout/_widget/comment/livere/enter.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!-- 使用 来必力 -->
<div id="livere-comment">
<%- partial('_widget/comment/' + theme.comment.use + '/main') %>
</div>
<style>
#livere-comment{
background-color: #eee;
padding: 2pc;
}
</style>
12 changes: 12 additions & 0 deletions layout/_widget/comment/livere/main.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<div id="lv-container" data-id="<%= theme.comment.livere_type %>" data-uid="<%= theme.comment.livere_data_uid %>">
<script type="text/ls-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>
</div>