This post refers to a legacy version of Siteleaf.
Following sort
and where
, this Advanced Liquid post introduces another handy new filter to Siteleaf: group_by
.
As the name suggests, this filter allows you to group your content by a certain property.
For example, here’s how we could group all posts by year published:
{% assign posts_by_year = site.posts | group_by:"year" %}
You can group by any property like date, title, slug, even metadata and taxonomy. Here are a few real-world examples you may want to apply to your theme.
Read more