comments.html 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. {% if DISQUS_SITENAME %}
  2. <hr/>
  3. <section class="comments" id="comments">
  4. <h2>Comments</h2>
  5. <div id="disqus_thread"></div>
  6. <script type="text/javascript">
  7. /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
  8. var disqus_shortname = '{{ DISQUS_SITENAME }}'; // required: replace example with your forum shortname
  9. {% if article %}
  10. {% if not DISQUS_NO_ID %}
  11. var disqus_identifier = '{{ article.date|strftime('%Y-%m-') ~ article.slug if DISQUS_ID_PREFIX_SLUG else article.slug }}';
  12. {% endif %}
  13. var disqus_url = '{{ SITEURL }}/{{ article.url }}';
  14. {% elif page %}
  15. {% if not DISQUS_NO_ID %}
  16. var disqus_identifier = 'page-{{ page.slug }}';
  17. {% endif %}
  18. var disqus_url = '{{ SITEURL }}/{{ page.url }}';
  19. {% endif %}
  20. var disqus_config = function () {
  21. this.language = "{{ DEFAULT_LANG }}";
  22. };
  23. /* * * DON'T EDIT BELOW THIS LINE * * */
  24. (function () {
  25. var dsq = document.createElement('script');
  26. dsq.type = 'text/javascript';
  27. dsq.async = true;
  28. dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
  29. (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
  30. })();
  31. </script>
  32. <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by
  33. Disqus.</a></noscript>
  34. <a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
  35. </section>
  36. {% endif %}