Add disquss comment counter at the bottom of each article on the index page
This commit is contained in:
parent
ec070a15bd
commit
67dd689249
2 changed files with 18 additions and 0 deletions
|
@ -190,5 +190,22 @@
|
||||||
{% if GITHUB_CORNER_URL %}
|
{% if GITHUB_CORNER_URL %}
|
||||||
{% include 'partial/github.html' %}
|
{% include 'partial/github.html' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if DISQUS_SITENAME %}
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
|
||||||
|
var disqus_shortname = '{{ DISQUS_SITENAME }}'; // required: replace example with your forum shortname
|
||||||
|
|
||||||
|
/* * * DON'T EDIT BELOW THIS LINE * * */
|
||||||
|
(function () {
|
||||||
|
var s = document.createElement('script'); s.async = true;
|
||||||
|
s.type = 'text/javascript';
|
||||||
|
s.src = '//' + disqus_shortname + '.disqus.com/count.js';
|
||||||
|
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
|
||||||
|
}());
|
||||||
|
</script>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -41,6 +41,7 @@
|
||||||
{{ article.summary }}
|
{{ article.summary }}
|
||||||
<br>
|
<br>
|
||||||
<a class="btn" href="{{ SITEURL }}/{{ article.url }}{% if not DISABLE_URL_HASH %}#{{ article.slug }}{% endif %}">{{ _('Continue reading') }}</a>
|
<a class="btn" href="{{ SITEURL }}/{{ article.url }}{% if not DISABLE_URL_HASH %}#{{ article.slug }}{% endif %}">{{ _('Continue reading') }}</a>
|
||||||
|
<a class="btn" href="{{ SITEURL }}/{{ article.url }}#disqus_thread">{{ _('View Comments') }}</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ article.content }}
|
{{ article.content }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Add table
Reference in a new issue