diff --git a/_layouts/categories.html b/_layouts/categories.html index 0c7521f3..aa2c6e80 100644 --- a/_layouts/categories.html +++ b/_layouts/categories.html @@ -4,13 +4,14 @@ layout: archive {{ content }} +{% assign categories_max = 0 %} +{% for category in site.categories %} + {% if category[1].size > categories_max %} + {% assign categories_max = category[1].size %} + {% endif %} +{% endfor %} + -{% assign categories_max = 0 %} -{% for category in site.categories %} - {% if category[1].size > categories_max %} - {% assign categories_max = category[1].size %} - {% endif %} -{% endfor %} - {% for i in (1..categories_max) reversed %} {% for category in site.categories %} {% if category[1].size == i %}