make tag list modular, put on homepage

This commit is contained in:
Joshua Seigler 2025-06-29 17:04:44 -04:00
parent 19ad68397b
commit edb8805bd2
4 changed files with 12 additions and 9 deletions

View file

@ -12,13 +12,7 @@ eleventyComputed:
{% set tag = page.fileSlug %}
{% if collections[tag] %}
{% if tag === "posts" %}
<div style="--totalTags:{{ collections.categories | dictsort | length }}">
{%- for tag, data in collections.categories -%}
<a class="button tag" style="--tagIndex:{{ collections.categories[tag].id }}" href="/tags/{{ tag | slugify }}/">{{ tag }}
<span class="tagCount">{{ data.count }}</span>
</a>
{%- endfor -%}
</div>
{% include "-taglist.njk" %}
{% endif %}
{{ collectionList(tag) }}
{% endif %}