{# This Page Shows the Posts Grouped by Year: example.com/posts/ #} {% extends "base.html" %} {%- block seo %} {{- super() }} {%- set title = "Posts" %} {%- if config.title %} {%- set title_addition = title_separator ~ config.title %} {%- else %} {%- set title_addition = "" %} {%- endif %} {%- set description = config.description %} {{- macros_head::seo(title=title, title_addition=title_addition, description=description, is_home=true) }} {%- endblock seo %} {%- block content %} {%- set section_item = get_section(path="_index.md") %}
{%- for year, posts in section_item.pages | group_by(attribute="year") %}

{{ year }}

{%- for post in posts %}

{{ post.title }} - {{ post.date | date(format="%F") }}

{%- endfor %} {%- endfor %}
{%- endblock content %}