Skip to content

Commit 0c7cf03

Browse files
committed
Show Disqus comment counts on home page
1 parent 0425895 commit 0c7cf03

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

_layouts/home.html

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ <h2>
2323
</a>
2424
</h2>
2525
<span class="post-meta">{{ post.date | date: date_format }}</span>
26+
{%- if jekyll.environment == "production" and site.disqus -%}
27+
<span class="post-meta disqus-comment-count" data-disqus-url="{{ post.url | absolute_url }}"></span>
28+
{%- endif -%}
2629
{%- if post.show_excerpts != false -%}
2730
<div class="post-excerpt">{{ post.excerpt | strip_html }}</div>
2831
{%- endif -%}
@@ -49,5 +52,8 @@ <h2>
4952
{%- endif %}
5053

5154
{%- endif -%}
52-
55+
56+
{%- if jekyll.environment == "production" and site.disqus -%}
57+
<script id="dsq-count-scr" src="//{{ site.disqus }}.disqus.com/count.js" async></script>
58+
{%- endif -%}
5359
</div>

0 commit comments

Comments
 (0)