File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22 < link rel= " stylesheet" href= " https://imsun.github.io/gitment/style/default.css" >
33 < script src= " https://imsun.github.io/gitment/dist/gitment.browser.js" >< / script>
44 < script>
5- var gitment = new Gitment ({
6- owner: ' <%= theme.comment.gitment.owner %>' ,
7- repo: ' <%= theme.comment.gitment.repo %>' ,
8- oauth: {
9- client_id: ' <%= theme.comment.gitment.client_id %>' ,
10- client_secret: ' <%= theme.comment.gitment.client_secret %>' ,
11- },
12- })
13- gitment .render (' commentContainer' )
5+ if (document .getElementById (' comments' )) {
6+ var gitment = new Gitment ({
7+ owner: ' <%= theme.comment.gitment.owner %>' ,
8+ repo: ' <%= theme.comment.gitment.repo %>' ,
9+ oauth: {
10+ client_id: ' <%= theme.comment.gitment.client_id %>' ,
11+ client_secret: ' <%= theme.comment.gitment.client_secret %>' ,
12+ },
13+ })
14+ gitment .render (' comments' )
15+ }
1416 < / script>
15- < % } else { % >
16- < div id= " commentContainer" >< / div>
1717< % } %>
You can’t perform that action at this time.
0 commit comments