hacks-guide-minimal-mistake.../test/_pages/year-archive.html

14 lines
392 B
HTML
Raw Normal View History

2016-09-22 04:13:25 +02:00
---
layout: archive
permalink: /year-archive/
title: "Posts by Year"
author_profile: true
---
2018-01-06 02:47:34 +01:00
{% assign postsByYear = site.posts | group_by_exp:"post", "post.date | date: '%Y'" %}
{% for year in postsByYear %}
<h2 id="{{ year.name | slugify }}" class="archive__subtitle">{{ year.name }}</h2>
{% for post in year.items %}
{% include archive-single.html %}
{% endfor %}
2016-09-22 04:13:25 +02:00
{% endfor %}