summaryrefslogtreecommitdiff
path: root/_includes/disqus-counts.html
blob: 0c41e2b56c298773b970622251d8519b349b2134 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{% if site.comments and site.disqus != '' %}
  <script type="text/javascript">
    var disqus_shortname = '{{ site.disqus }}';

    var disqus_config = function () {
        this.page.identifier = '{{ page.url | slugify }}';
    };

   (function () {
     var s = document.createElement('script'); s.async = true;
     s.type = 'text/javascript';
     s.src = '//' + disqus_shortname + '.disqus.com/count.js';
     (document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
   }());
 </script>
{% endif %}