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:
@@ -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 %}
|
||||
|
||||
Reference in New Issue
Block a user