make tag list modular, put on homepage
This commit is contained in:
parent
19ad68397b
commit
edb8805bd2
4 changed files with 12 additions and 9 deletions
|
@ -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 %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue