{%- assign list_items = include.list_items -%} {%- assign list_type = include.list_type -%}
{%- if list_type == "posts" -%} {% assign posts_by_years = list_items | group_by_exp: 'post', 'post.date | date: "%Y"' %} {% for year in posts_by_years %}
{% endfor %} {%- else -%} {% assign taxonomies = list_items %} {% for taxonomy in taxonomies %} {%- capture tax_0 -%} {{ taxonomy[0] | slugify }} {%- endcapture -%}
{% endfor %} {%- endif -%}