Enabled Disqus comments on articles of DISQUS_SITENAME property is set.
diff --git a/README.md b/README.md
index 691a719..7275d54 100644
--- a/README.md
+++ b/README.md
@@ -30,6 +30,8 @@
- `USER_LOGO_URL` you don't need to replace the logo placeholder, instead put your logo in content/images/your_logo.png and make this point to `SITEURL + '/static/images/your_logo.png'`
+- `DISQUS_SITENAME` set this to enable disqus comments in articles
+
- `TAGLINE` some text rendered right below the logo
- `INTERNET_DEFENSE_LEAGUE` set this to `True` if you want to enable the [Internet Defense League](http://internetdefenseleague.org) code
@@ -47,4 +49,4 @@
## LICENSE
-Released under MIT License, full details in `LICENSE` file.
\ No newline at end of file
+Released under MIT License, full details in `LICENSE` file.
diff --git a/templates/article.html b/templates/article.html
index 627623c..25d3b3d 100644
--- a/templates/article.html
+++ b/templates/article.html
@@ -27,6 +27,22 @@
</p>
{% endif %}
</div>
+
+ {% if DISQUS_SITENAME %}
+ <div class="comments">
+ <h2>Comments !</h2>
+ <div id="disqus_thread"></div>
+ <script type="text/javascript">
+ var disqus_identifier = "{{ article.url }}";
+ (function() {
+ var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+ dsq.src = 'http://{{ DISQUS_SITENAME }}.disqus.com/embed.js';
+ (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+ })();
+ </script>
+ </div>
+ {% endif %}
+
</article>
{% endblock %}