1
0
Fork 0
forked from github/pelican

Add comment number support.

This commit is contained in:
Alexis Metaireau 2010-12-19 03:34:19 +00:00
commit a71d93c63c
4 changed files with 17 additions and 1 deletions

View file

@ -79,5 +79,6 @@
</footer><!-- /#contentinfo -->
{% include 'analytics.html' %}
{% include 'disqus_script.html' %}
</body>
</html>

View file

@ -0,0 +1 @@
{% if DISQUS_SITENAME %}<p>There are <a href="{{ SITEURL }}/{{ article.slug }}.html#disqus_thread">comments</a>.</p>{% endif %}

View file

@ -0,0 +1,11 @@
{% if DISQUS_SITENAME %}
<script type="text/javascript">
var disqus_shortname = '{{ DISQUS_SITENAME }}';
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>
{% endif %}

View file

@ -21,7 +21,9 @@
{% include 'taglist.html' %}
</footer><!-- /.post-info -->
{{ article.content }}
</article></aside><!-- /#featured -->
{% include 'comments.html' %}
</article>
</aside><!-- /#featured -->
{% if loop.length > 1 %}
<section id="content" class="body">
<h1>Other articles</h1>
@ -49,6 +51,7 @@
</footer><!-- /.post-info -->
{{ article.summary }}
<a class="readmore" href="{{ SITEURL }}/{{ article.url }}">read more</a>
{% include 'comments.html' %}
</div><!-- /.entry-content -->
</article></li>
{% endif %}