Emit disqus comments only in post pages.
This commit is contained in:
parent
6bcb7ca381
commit
3a643b07cc
1 changed files with 12 additions and 9 deletions
|
|
@ -22,17 +22,20 @@
|
|||
</script>
|
||||
{% endif %}
|
||||
|
||||
<!-- Disqus -->
|
||||
|
||||
{% if site.disqus-shortname %}
|
||||
<script type="text/javascript">
|
||||
var disqus_shortname = '{{ site.disqus-shortname }}';
|
||||
(function() {
|
||||
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
|
||||
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
|
||||
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
|
||||
})();
|
||||
</script>
|
||||
<!-- Disqus -->
|
||||
|
||||
{% if page.section-type == "post" %}
|
||||
<script type="text/javascript">
|
||||
var disqus_shortname = '{{ site.disqus-shortname }}';
|
||||
(function() {
|
||||
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
|
||||
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
|
||||
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
|
||||
})();
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
{% if page.section-type == "post" or page.section-type == "blog" or page.section-type == "index" or page.section-type == "tag" %}
|
||||
<!-- Comments counter -->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue