From feb3b727c5bbeeccd6a9b0670e381c9d0d2f59c1 Mon Sep 17 00:00:00 2001 From: David Leitko Date: Sun, 26 May 2024 17:46:30 -0400 Subject: [PATCH] Updated card component to show all tags --- src/_includes/components/card.njk | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/_includes/components/card.njk b/src/_includes/components/card.njk index 0198002..5d8ce96 100644 --- a/src/_includes/components/card.njk +++ b/src/_includes/components/card.njk @@ -17,7 +17,16 @@ if activateTags and item.data.tags.length > 1 %} - {{ item.data.tags[1] }} + {# For cards with multiple tags, show all tags for the card #} + {% for tagButton in range( 0, item.data.tags.length ) %} + {# Skip "administrative" tags like 'posts' and 'feature' #} + {% if + (item.data.tags[ tagButton ] != "posts") and + (item.data.tags[ tagButton ] != "feature") + %} + {{ item.data.tags[ tagButton ] }} + {% endif %} + {% endfor %} {% endif %}