23 lines
855 B
Plaintext
23 lines
855 B
Plaintext
|
<% if(
|
||
|
theme.comment.gitalk.enable
|
||
|
&& theme.comment.gitalk.client_id
|
||
|
&& theme.comment.gitalk.client_secret
|
||
|
&& theme.comment.gitalk.github_id
|
||
|
&& theme.comment.gitalk.repository
|
||
|
) { %>
|
||
|
<script src="https://unpkg.com/gitalk/dist/gitalk.min.js"></script>
|
||
|
<div id="gitalk-container"></div>
|
||
|
<script>
|
||
|
const gitalk = new Gitalk({
|
||
|
clientID: '<%= theme.comment.gitalk.client_id %>',
|
||
|
clientSecret: '<%= theme.comment.gitalk.client_secret %>',
|
||
|
repo: '<%= theme.comment.gitalk.repository %>',
|
||
|
owner: '<%= theme.comment.gitalk.github_id %>',
|
||
|
admin: ['<%= theme.comment.gitalk.github_id %>'],
|
||
|
id: location.pathname,
|
||
|
language: '<%= config.language %>'
|
||
|
})
|
||
|
gitalk.render('gitalk-container')
|
||
|
</script>
|
||
|
<% } %>
|