tag collections added

This commit is contained in:
Matt DeCamp 2021-09-05 22:39:19 -04:00
parent 36ff1132a2
commit 5de802b090
2 changed files with 26 additions and 2 deletions

View file

@ -5,4 +5,8 @@ layout: base
<article>
<h2>{{ title }}</h2>
{{ content | safe }}
{% for tag in tags %}
{% set tagUrl %}/tags/{{ tag | slug }}/{% endset %}
<a href="{{ tagUrl | url }}">{{ tag }}</a>
{% endfor %}
</article>

View file

@ -1,3 +1,23 @@
---
layout: layouts/base
---
layout: base
title: Tags
pagination:
data: collections
size: 3
alias: tag
filter:
- all
permalink: /tags/{{ tag }}/
---
<h2>Posts filed under “{{ tag }}”</h2>
<ul>
{% set postlist = collections[ tag ] %}
{% for post in postlist | reverse %}
<li>
<a href="{{ post.url | url }}">{{ post.data.title }}</a>
<time>{{ post.date }}</time>
</li>
{% endfor %}
</ul>
<p>See <a href="{{ '/tags/' | url }}">all tags</a>.</p>