1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-02 23:00:04 +08:00

Use gitment

This commit is contained in:
wsdjeg 2018-07-03 22:09:43 +08:00
parent 94cc308358
commit e57d0a3ede

View File

@ -106,20 +106,21 @@
{% if page.comments %} {% if page.comments %}
<div id="disqus_thread"></div> <div id="container"></div>
<script> <link rel="stylesheet" href="https://imsun.github.io/gitment/style/default.css">
var disqus_config = function () { <script src="https://imsun.github.io/gitment/dist/gitment.browser.js"></script>
this.page.url = '{{ page.url | absolute_url }}'; <script>
this.page.identifier = '{{ page.url | absolute_url }}'; var gitment = new Gitment({
}; id: '页面 ID', // 可选。默认为 location.href
(function() { owner: 'wsdjeg',
var d = document, s = d.createElement('script'); repo: 'SpaceVim-comments',
s.src = 'https://spacevim.disqus.com/embed.js'; oauth: {
s.setAttribute('data-timestamp', +new Date()); client_id: '8f0cd1f544d1e4219798',
(d.head || d.body).appendChild(s); client_secret: '8d44f307314216d5f9418dcc06ef32e787d39a0e',
})(); },
</script> })
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript> gitment.render('container')
</script>
{% endif %} {% endif %}