feat: reorg pages

This commit is contained in:
Devin Haska 2024-03-22 16:40:28 -07:00
parent 0e3ef370c7
commit 593f20560d
16 changed files with 8 additions and 24 deletions

View file

@ -1,24 +0,0 @@
---
layout: "layouts/base"
pagination:
data: collections.postsByTag
size: 1
alias: tag
filter:
- post
permalink: /tags/{{ tag | slugify }}/index.html
---
{% from "macros/posts.njk" import yearList %}
<h1>Tag: {{ tag }}</h1>
<p>
All posts tagged with "{{ tag }}", or go back to <a href="/tags">all tags</a>.
</p>
{% set itemsByYear = collections.postsByTag[tag] | reverse | organizeByDate %}
{% set years = itemsByYear | keys | sort("desc") %}
<section class="[ flow ]">
{% for year in years %}
{% set itemsInYear = itemsByYear[year] %}
{{ yearList(itemsInYear, year) }}
{% endfor %}
</section>