diff options
author | Justin Mayer <entroP@gmail.com> | 2014-07-02 12:42:41 -0700 |
---|---|---|
committer | Justin Mayer <entroP@gmail.com> | 2014-07-02 12:42:41 -0700 |
commit | 6524eb66ed4c6ec6ab595d6d1cbe7124d9506c56 (patch) | |
tree | ec7cc08d7cca5e0d89da024e0ab35ca2d26378ae /monospace/templates/article.html | |
parent | 8e41fb3683abe16711deb23f0f1e12de1543e031 (diff) | |
parent | 448457fb4ccdc6eb0e4190d009ee23ef996a8ecb (diff) | |
download | pelican-themes-6524eb66ed4c6ec6ab595d6d1cbe7124d9506c56.tar.gz |
Merge pull request #233 from tompollard/master
Add Disqus comments to articles in monospace theme
Diffstat (limited to 'monospace/templates/article.html')
-rw-r--r-- | monospace/templates/article.html | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/monospace/templates/article.html b/monospace/templates/article.html index 9758fdc..722e5c5 100644 --- a/monospace/templates/article.html +++ b/monospace/templates/article.html @@ -8,5 +8,22 @@ </header> <article> {{ article.content }} + {% if DISQUS_SITENAME and SITEURL and article.status != "draft" %} + <h2>Comments</h2> + <div id="disqus_thread"></div> + <script type="text/javascript"> + var disqus_shortname = '{{ DISQUS_SITENAME }}'; + var disqus_identifier = '{{ article.url }}'; + var disqus_url = '{{ SITEURL }}/{{ article.url }}'; + (function() { + var dsq = document.createElement('script'); + dsq.type = 'text/javascript'; dsq.async = true; + dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js'; + (document.getElementsByTagName('head')[0] || + document.getElementsByTagName('body')[0]).appendChild(dsq); + })(); + </script> + <noscript>Please enable JavaScript to view the comments.</noscript> + {% endif %} </article> {% endblock %} |