feat: reorg pages
This commit is contained in:
parent
0e3ef370c7
commit
593f20560d
16 changed files with 8 additions and 24 deletions
24
src/tag.html
24
src/tag.html
|
@ -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>
|
Loading…
Add table
Add a link
Reference in a new issue