aboutsummaryrefslogtreecommitdiff
path: root/src/tags.njk
blob: 6eff101d71c3424737f700abb75bbb4e097422a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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>