From 559b765bf3a73dfbb66a086e841998c030e7a62b Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sun, 8 Nov 2020 14:22:49 -0300 Subject: _includes/categories.html: Allow articles with multiple comma-separated categories --- _includes/categories.html | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/_includes/categories.html b/_includes/categories.html index 7c91a93..60a6ed6 100644 --- a/_includes/categories.html +++ b/_includes/categories.html @@ -10,7 +10,10 @@ {% assign categories = "" | split:"" %} {% for article in articles_with_categories %} - {% assign categories = categories | push:article.category %} + {% assign article_categories = article.category | split:"," %} + {% for article_category in article_categories %} + {% assign categories = categories | push:article_category %} + {% endfor %} {% endfor %} {% assign unique_categories = categories | sort | uniq %} @@ -20,11 +23,14 @@ {% endfor %} -- cgit v1.2.3