diff options
Diffstat (limited to '_site_build/_includes')
| -rw-r--r-- | _site_build/_includes/disqus.html | 10 | ||||
| -rw-r--r-- | _site_build/_includes/post_excerpt.html | 5 |
2 files changed, 11 insertions, 4 deletions
diff --git a/_site_build/_includes/disqus.html b/_site_build/_includes/disqus.html index 01bb568..ae4be5e 100644 --- a/_site_build/_includes/disqus.html +++ b/_site_build/_includes/disqus.html @@ -1,6 +1,10 @@ <script type="text/javascript"> var disqus_shortname='{{ site.disqus_shortname }}',disqus_identifier='{{ page.url }}',disqus_url='{{ site.url}}{{ page.url }}',disqus_title='{{ page.title | replace: "'", "\\'" }}'{% unless site.production %},disqus_developer=1{% endunless %}; - (function(d,t){var q=d.createElement(t),s=d.getElementsByTagName(t)[0]; - q.src='//{{ site.disqus_shortname }}.disqus.com/embed.js'; - s.parentNode.insertBefore(q,s);}(document,'script')); + (function(d,t){ + function i(u){var q=d.createElement(t),s=d.getElementsByTagName(t)[0];q.src=u;s.parentNode.insertBefore(q,s);} + {% if page.comments %} + i('//{{ site.disqus_shortname }}.disqus.com/embed.js'); + {% endif %} + i('//{{ site.disqus_shortname }}.disqus.com/count.js'); + }(document,'script')); </script> diff --git a/_site_build/_includes/post_excerpt.html b/_site_build/_includes/post_excerpt.html index 48e4a1e..9578551 100644 --- a/_site_build/_includes/post_excerpt.html +++ b/_site_build/_includes/post_excerpt.html @@ -3,7 +3,10 @@ <h1><a href="{{ post.url }}" rel="bookmark" target="_self" title="{{ post.title }}">{{ post.title }}</a></h1> <time datetime="{{ post.date | date: '%Y-%m-%d' }}" pubdate>{{ post.date | date: '%A' }} {{ post.date | ordinalize }} {{ post.date | date: '%B, %Y' }}</time> {% if post.categories.size != 0 %} - <div class="categories">Posted in {{ post.categories | category_links }}</div> + <span class="categories"> | Posted in {{ post.categories | category_links }}</span> + {% endif %} + {% if post.comments and site.disqus_shortname %} + <span class="comment-count"> | <a href="{{ page.url }}#disqus_thread" data-disqus-identifier="{{ page.url }}">Comments</a></span> {% endif %} </header> {{ post.content | truncate }} |
