--- layout: default --- <div class="archive"> {% for post in site.posts %} {% assign currDate = post.date | date: "%Y" %} {% if currDate != date %} <h2 class="archive-year">{{ currDate }}</h1> {% assign date = currDate %} {% endif %} <div class="archive-item"> <span class="post-date archive-date fs-5 text-muted" >{{ post.date | date: "%b %d, %Y" }}</span > <a href="{{ post.url | relative_url }}" class="archive-title fs-5" >{{ post.title }}</a > </div> {% endfor %} </div>