feat: derive gardenStage from nested tags (garden/cultivate)

- eleventyComputed in content.11tydata.js resolves gardenStage from
  category/tags at build time — no explicit gardenStage frontmatter needed
- withoutGardenTags filter strips garden/* from category pill rendering
- categories collection excludes garden/* entries (no phantom category pages)
- All list templates and post layout use withoutGardenTags filter
This commit is contained in:
svemagie
2026-03-15 09:41:18 +01:00
parent 1223afc9e9
commit 04b6ed1217
12 changed files with 90 additions and 46 deletions

View File

@@ -30,12 +30,12 @@ permalink: "photos/{% if pagination.pageNumber > 0 %}page/{{ pagination.pageNumb
<time class="dt-published font-mono text-sm" datetime="{{ post.date | isoDate }}">
{{ post.date | dateDisplay }}
</time>
{% if post.data.category %}
{% if post.data.category | withoutGardenTags %}
<span class="post-categories">
{% if post.data.category is string %}
<a href="/categories/{{ post.data.category | slugify }}/" class="p-category">{{ post.data.category }}</a>
{% else %}
{% for cat in post.data.category %}
{% for cat in (post.data.category | withoutGardenTags) %}
<a href="/categories/{{ cat | slugify }}/" class="p-category">{{ cat }}</a>
{% endfor %}
{% endif %}