2020-11-27 07:50:58 +00:00
|
|
|
<% if (theme.gitalk.enable && post.comments) { %>
|
2019-12-16 15:48:13 +00:00
|
|
|
<div class="gitalk" id="gitalk-container"></div>
|
2021-04-14 01:38:10 +00:00
|
|
|
<%- css('https://cdn.jsdelivr.net/npm/gitalk@1.7.2/dist/gitalk.css') %>
|
|
|
|
<%- js('https://cdn.jsdelivr.net/npm/gitalk@1.7.2/dist/gitalk.min.js') %>
|
2019-12-16 15:48:13 +00:00
|
|
|
<%- js('https://cdn.jsdelivr.net/npm/blueimp-md5@2.10.0/js/md5.min.js') %>
|
|
|
|
<script type="text/javascript">
|
|
|
|
var gitalk = new Gitalk({
|
|
|
|
clientID: '<%- theme.gitalk.clientID %>',
|
|
|
|
clientSecret: '<%- theme.gitalk.clientSecret %>',
|
|
|
|
repo: '<%- theme.gitalk.repo %>',
|
|
|
|
owner: '<%- theme.gitalk.owner %>',
|
|
|
|
admin: ['<%- theme.gitalk.admin %>'],
|
|
|
|
// id: location.pathname, // Ensure uniqueness and length less than 50
|
|
|
|
id: md5(location.pathname),
|
|
|
|
distractionFreeMode: false, // Facebook-like distraction free mode
|
|
|
|
pagerDirection: 'last'
|
|
|
|
})
|
2019-12-03 11:37:44 +00:00
|
|
|
|
|
|
|
gitalk.render('gitalk-container')
|
2019-12-16 15:48:13 +00:00
|
|
|
</script>
|
2020-11-26 07:12:08 +00:00
|
|
|
<% } %>
|