{% if include.category %} {% assign posts = site.categories. %} {% assign category = site.data.categories %} {% else %} {% assign posts = site.posts %} {% endif %} {% if category %} <h1>{{ category.title | markdownify | remove: ‘<p>’ | remove: ‘</p>’ | strip }}</h1> <p>{{ category.description | markdownify | remove: ‘<p>’ | remove: ‘</p>’ | strip }}</p> {% endif %} <nav id=“{{ include.id }}” aria-label=“{{ include.aria_label }}”>
{% if include.limit %} {% for post in posts limit: include.limit %} <article class="post_list"> <header> <h3>{% unless post.altTitle %}{{ post.title }}{% else %}{{ post.altTitle | markdownify | remove: '<p>' | remove: '</p>' | strip }}{% endunless %}</h3> </header> <section> <p>{{ post.description }}</p> </section> <aside> {% include post-list-meta.html %} </aside> </article> {% endfor %} {% else %} {% for post in posts %} <article class="post_list"> <header> <h3>{% unless post.altTitle %}{{ post.title }}{% else %}{{ post.altTitle | markdownify | remove: '<p>' | remove: '</p>' | strip }}{% endunless %}</h3> {% include post-list-meta.html %} </header> <section> <p>{{ post.description }}</p> </section> </article> {% endfor %} {% endif %}
</nav>