summaryrefslogtreecommitdiffstats
path: root/layouts/partials/comment-disqus.html
blob: 81c9c6885f1aceffc20bad9887d049f1ed47925e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{{ with .Site.Params.disqusShortname }}
<div id="post-comment">
    <div id="disqus_thread"></div>
    <script>
        var disqus_config = function () {
            this.page.url = "{{ $.Permalink }}";
            this.page.identifier = "{{ $.RelPermalink }}";
        };
        (function () {
            var d = document,
                s = d.createElement('script');
            s.src = 'https://{{ . }}.disqus.com/embed.js';
            s.setAttribute('data-timestamp', +new Date());
            (d.head || d.body).appendChild(s);
        })();
    </script>
</div>
{{ end }}