{% if site.disqus_shortname %}
  <div id="disqus_thread"></div>
  <script>
  /*
   * var disqus_config = function () {
   * this.page.url = PAGE_URL;
   * this.page.identifier = PAGE_IDENTIFIER;
   * };
   */
  (function() {
    var d = document, s = d.createElement('script');
    s.src = '//{{ site.disqus_shortname }}.disqus.com/embed.js';
    s.setAttribute('data-timestamp', +new Date());
    (d.head || d.body).appendChild(s);
  })();
  </script>
  <noscript>
    Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a>
  </noscript>
{% endif %}

{% if site.isso_link %}
<script data-isso="{{ site.isso_link }}"
        src="{{ site.isso_link }}js/embed.dev.js"></script>
<section id="isso-thread"
         data-title="{{ page.title }}"
         data-isso-id="{{ page.id }}"></section>
<noscript>
    Please enable JavaScript to view the comments powered by <a href="https://posativ.org/isso/">ISSO</a>.
  </noscript>
{% endif %}

{% if site.disqus_shortname %}
  <div id="disqus_thread"></div>
  <script>
  var disqus_config = function () {
    this.page.url = {{ page.id | prepend: site.ampdir | prepend: site.baseurl | prepend: site.url }};
    this.page.identifier = {{ page.id }};
  };
  (function() {
    var d = document, s = d.createElement('script');
    s.src = '//{{ site.disqus_shortname }}.disqus.com/embed.js';
    s.setAttribute('data-timestamp', +new Date());
    (d.head || d.body).appendChild(s);
  })();
  </script>
  <noscript>
    Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a>
  </noscript>
{% endif %}

{% if site.isso_link %}
<script data-isso="{{ site.isso_link }}"
        src="{{ site.isso_link }}js/embed.dev.js"></script>
<section id="isso-thread"
         data-title="{{ page.title }}"
         data-isso-id="{{ page.id }}"></section>
<noscript>
    Please enable JavaScript to view the comments powered by <a href="https://posativ.org/isso/">ISSO</a>.
  </noscript>
{% endif %}

Add page link & ID to Disqus parameters.
Add page link & ID to Disqus parameters.