From 25b8cf14eb980361e00349bc110ff51bae50ff7c Mon Sep 17 00:00:00 2001 From: Soroosh Pezeshki Date: Sun, 11 Feb 2024 17:00:08 +0100 Subject: [PATCH] Add item counts to categories --- _layouts/categories.liquid | 9 +++++++-- pages/categories.md | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/_layouts/categories.liquid b/_layouts/categories.liquid index 6f5022d597..c7648f09f5 100644 --- a/_layouts/categories.liquid +++ b/_layouts/categories.liquid @@ -9,7 +9,7 @@ layout: page {% for category in site.categories %}
  • - {{ category | first }} + {{ category | first }}
  • @@ -20,7 +20,12 @@ layout: page {% for category in site.categories %}
    {% capture group %}{{ category | first }}{% endcapture %} -

    {{ group }}

    +

    + {{ group }} + {% if page.showCounts %} + ({{site.categories[group].size}}) + {% endif %} +