forked from github/pelican
Add comment number support.
This commit is contained in:
parent
67b43c6079
commit
a71d93c63c
4 changed files with 17 additions and 1 deletions
|
|
@ -79,5 +79,6 @@
|
|||
</footer><!-- /#contentinfo -->
|
||||
|
||||
{% include 'analytics.html' %}
|
||||
{% include 'disqus_script.html' %}
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
1
pelican/themes/notmyidea/templates/comments.html
Normal file
1
pelican/themes/notmyidea/templates/comments.html
Normal file
|
|
@ -0,0 +1 @@
|
|||
{% if DISQUS_SITENAME %}<p>There are <a href="{{ SITEURL }}/{{ article.slug }}.html#disqus_thread">comments</a>.</p>{% endif %}
|
||||
11
pelican/themes/notmyidea/templates/disqus_script.html
Normal file
11
pelican/themes/notmyidea/templates/disqus_script.html
Normal 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 %}
|
||||
|
|
@ -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 %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue