{% if site.data.comments or page.comments != false %}
<section id="comments" class="content"> <h2 class="comments-title"> {{ site.comments.title }} </h2> {% if site.data.comments[page.slug] %} <ol class="comments-list"> {% assign comments = site.data.comments[page.slug] | sort: date %} {% for comment_object in site.data.comments[page.slug] %} {% assign comment = comment_object | last %} <li class="comment-item"> <section class="comment"> <header class="comment-meta"> <img class="author-avatar" src="//www.gravatar.com/avatar/{{ comment.email }}?d=monsterid&s=64" alt="" /> <h5 class="author"> {% if comment.website %} <a href="{{ comment.website }}" rel="author"> {{ comment.name }} </a> {% else %} {{ comment.name }} {% endif %} </h5> <time class="comment-date"> {{ comment.date | date: site.comments.date_format }} </time> </header> <div class="comment-body"> {{ comment.message | markdownify }} </div> </section> </li> {% endfor %} </ol> {% endif %} {% include post/comment-form.html %} </section>
{% endif %}