<!-- copied from https://github.com/rbind/yihui/blob/master/layouts/partials/disqus.html -->
{{ if and (not (eq .Site.Config.Services.Disqus.Shortname "")) (and (not .Params.disable_comments) (or (eq .Kind "404") (and (not .IsHome) .Content))) }}
<section class="comments">
  <div id="disqus_thread"></div>
  <script>
  var disqus_config = function () {
  {{ with .Site.Params.disqusURL }}
    this.page.url = "{{ . }}" +{{ if eq $.Kind "404" }} "/404.html" {{ else }} location.pathname{{ end }};
  {{ end }}
  }