Overview
site.categories.*category_name*
gives us an array of posts in that category:
...
<ul>
{% for post in site.categories.books %}
<li><a href="{{ post.url }}">{{ post.title }}</a></li>
{% endfor %}
</ul>
...
List all the posts in a particular category
site.categories.*category_name*
gives us an array of posts in that category:
...
<ul>
{% for post in site.categories.books %}
<li><a href="{{ post.url }}">{{ post.title }}</a></li>
{% endfor %}
</ul>
...
Need more? Checkout the directory for all of our tutorials
Explore moreJoin thousands of developers building sites on CloudCannon today
Get started free