I have a jekyll website and I have a category (called photo
) and I wanted to create a separate layout for a page that would list just the posts that were in the photo
category. I also want to keep posts with the photo
category out of the main index page.
All categories are available within the site object, access the posts of a category via site.categories.photo
so your loop would look like this
{% for post in site.categories.photo %}
# render the photo post html
{% endfor %}