disqus.html 796 B

123456789101112131415161718192021222324
  1. {#-
  2. This file was automatically generated - do not edit
  3. -#}
  4. {% set disqus = config.extra.disqus %}
  5. {% if page and page.meta and page.meta.disqus is string %}
  6. {% set disqus = page.meta.disqus %}
  7. {% endif %}
  8. {% if not page.is_homepage and disqus %}
  9. <h2 id="__comments">{{ lang.t("meta.comments") }}</h2>
  10. <div id="disqus_thread"></div>
  11. <script>
  12. var disqus_config = function () {
  13. this.page.url = "{{ page.canonical_url }}";
  14. this.page.identifier =
  15. "{{ page.canonical_url | replace(config.site_url, "") }}";
  16. };
  17. (function() {
  18. var d = document, s = d.createElement("script");
  19. s.src = "//{{ disqus }}.disqus.com/embed.js";
  20. s.setAttribute("data-timestamp", +new Date());
  21. (d.head || d.body).appendChild(s);
  22. })();
  23. </script>
  24. {% endif %}