feat: move categories to tags

This commit is contained in:
Devin Haska 2024-02-17 00:10:43 -08:00
parent b6c9a2b75c
commit 327b38f35b
56 changed files with 125 additions and 136 deletions

View file

@ -5,5 +5,4 @@ title: Catalogue
---
<h1>Catalogue yo</h1>
{% set items = collections.catalogue %}
{% include "partials/archive.html" %}
{% for item in collections.catalogue %}{{ item.data.tags | dump }}{% endfor %}

View file

@ -8,5 +8,5 @@ title: Posts
<p>
View all <a href="/tags">tags</a>
</p>
{% set items = collections.posts %}
{% set items = collections.post %}
{% include "partials/archive.html" %}

View file

@ -1,14 +1,14 @@
---
eleventyComputed:
title: "Tag: {{ category.title }}"
permalink: "{{ category.href }}/index.html"
layout: base
pagination:
data: collections.categories
data: collections.postsByTag
size: 1
alias: category
alias: tag
filter:
- post
permalink: /tags/{{ tag | slugify }}/index.html
---
<h1>Tag: {{ category.title }}</h1>
{% set items = collections.posts | filterByCategory(category.title) %}
<h1>Tag: {{ tag }}</h1>
{% set items = collections.postsByTag[ tag ] %}
{% include "partials/archive.html" %}

View file

@ -4,13 +4,14 @@ permalink: /tags/index.html
title: All tags
---
{% set tags = collections.post | allTagCounts %}
<section class="[ flow ]">
<h1>{{ title }}</h1>
<ol class="[ flex flex-wrap gap-0.5 list-none p-0 mb-0 ]">
{% for category in collections.categories %}
{% for tag in tags %}
<li>
<a href="{{ category.href }}"
class="[ pill ] [ flex px-1 py-0.5 gap-0.5 ]">{{ category.title }} <span class="[ pill-count ]">{{ category.count }}</span></a>
<a href="/tags/{{ tag.tag | slugify }}"
class="[ pill ] [ flex px-1 py-0.5 gap-0.5 ]">{{ tag.tag }} <span class="[ pill-count ]">{{ tag.count }}</span></a>
</li>
{% endfor %}
</ol>