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