31 lines
1.0 KiB
HTML
31 lines
1.0 KiB
HTML
<div class="comments-box">
|
|
<div id="disqus_thread"></div>
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
var disqus_config = function () {
|
|
this.page.url = '{{ .page.Permalink }}'; // Replace PAGE_URL with your page's canonical URL variable
|
|
this.page.identifier = '{{ .page.Permalink | path.Base }}'; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
|
|
};
|
|
|
|
(function () {
|
|
const disqus = window.DISQUS
|
|
if (disqus) {
|
|
// Use DISQUS.reset instead of reloading embed.js please.
|
|
// https://help.disqus.com/en/articles/1717163-using-disqus-on-ajax-sites
|
|
disqus.reset({
|
|
reload: true,
|
|
config: disqus_config,
|
|
});
|
|
} else {
|
|
var d = document, s = d.createElement('script');
|
|
s.src = '//' + '{{ .disqus.shortname }}' + '.disqus.com/embed.js';
|
|
s.defer = true;
|
|
s.setAttribute('data-timestamp', +new Date());
|
|
// prevent the <script> from loading mutiple times by InstantClick
|
|
s.setAttribute('data-no-instant', '')
|
|
d.head.appendChild(s);
|
|
}
|
|
})();
|
|
</script>
|