fix(comment): disable gitment on index page
This commit is contained in:
parent
e11120f479
commit
a3a971e774
|
@ -2,16 +2,16 @@
|
|||
<link rel="stylesheet" href="https://imsun.github.io/gitment/style/default.css">
|
||||
<script src="https://imsun.github.io/gitment/dist/gitment.browser.js"></script>
|
||||
<script>
|
||||
var gitment = new Gitment({
|
||||
owner: '<%= theme.comment.gitment.owner %>',
|
||||
repo: '<%= theme.comment.gitment.repo %>',
|
||||
oauth: {
|
||||
client_id: '<%= theme.comment.gitment.client_id %>',
|
||||
client_secret: '<%= theme.comment.gitment.client_secret %>',
|
||||
},
|
||||
})
|
||||
gitment.render('commentContainer')
|
||||
if (document.getElementById('comments')) {
|
||||
var gitment = new Gitment({
|
||||
owner: '<%= theme.comment.gitment.owner %>',
|
||||
repo: '<%= theme.comment.gitment.repo %>',
|
||||
oauth: {
|
||||
client_id: '<%= theme.comment.gitment.client_id %>',
|
||||
client_secret: '<%= theme.comment.gitment.client_secret %>',
|
||||
},
|
||||
})
|
||||
gitment.render('comments')
|
||||
}
|
||||
</script>
|
||||
<% } else { %>
|
||||
<div id="commentContainer"></div>
|
||||
<% } %>
|
Loading…
Reference in New Issue