aboutsummaryrefslogtreecommitdiff
path: root/src/tags.njk
diff options
context:
space:
mode:
Diffstat (limited to 'src/tags.njk')
-rw-r--r--src/tags.njk36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/tags.njk b/src/tags.njk
new file mode 100644
index 0000000..6eff101
--- /dev/null
+++ b/src/tags.njk
@@ -0,0 +1,36 @@
+---
+layout: base.njk
+eleventyComputed:
+ title: Tagged “{{ tag }}”
+pagination:
+ data: collections
+ size: 1
+ alias: tag
+ filter:
+ - all
+ - post
+ - posts
+ - tagList
+permalink: /tags/{{tag}}/
+---
+
+<h1>Tagged “{{ tag }}”</h1>
+
+<ol>
+{% set postslist = collections[ tag ] %}
+
+
+
+
+<ol reversed class="postlist" style="counter-reset: start-from {{ (postslistCounter or postslist.length) + 1 }}">
+{% for post in postslist | reverse %}
+ <li class="postlist-item{% if post.url == url %} postlist-item-active{% endif %}">
+ <a href="{{ post.url | url }}" class="postlist-link">{% if post.data.title %}{{ post.data.title }}{% else %}<code>{{ post.url }}</code>{% endif %}</a>
+
+ {% for tag in post.data.tags | filterTagList %}
+ {% set tagUrl %}/tags/{{ tag | slugify }}/{% endset %}
+ <a href="{{ tagUrl | url }}" class="post-tag">{{ tag }}</a>
+ {% endfor %}
+ </li>
+{% endfor %}
+</ol> \ No newline at end of file