{% capture default_slug %}{{ page.slug | default: (page.title | slugify) }}{% endcapture %} {% capture slug %}{{ (page.slug | fallback: default_slug) | downcase | replace: '.', '-' }}{% endcapture %} {% assign comments_map = site.data.comments[slug] %} {% assign comments = site.emptyArray %} {% for comment in comments_map %} {% assign comments = comments | push: comment[1] %} {% endfor %} {% assign comment_count = comments | size %} {% assign author = site.authors[page.author] %}
Deixe seu comentário
{% include new-comment.html %}{% if comment_count == 1 %}Um comentário{% else %}{{ comment_count }} comentários{% endif %}
{% assign sorted_comments = comments | sort: 'date' %} {% for comment in sorted_comments %}-
{% include comment.html %}
{% endfor %}