diff --git a/site/_includes/news_item.html b/site/_includes/news_item.html index a41c66d0..60245d63 100644 --- a/site/_includes/news_item.html +++ b/site/_includes/news_item.html @@ -6,13 +6,7 @@ - {% for category in post.categories %} - {% if forloop.last %} - {{ category }} - {% else %} - {{ category | append: ', '}} - {% endif %} - {% endfor %} + {{ post.categories | array_to_sentence_string }}
diff --git a/site/_layouts/news_item.html b/site/_layouts/news_item.html index 96a61a19..6d27976a 100644 --- a/site/_layouts/news_item.html +++ b/site/_layouts/news_item.html @@ -9,13 +9,7 @@ layout: news - {% for category in page.categories %} - {% if forloop.last %} - {{ category }} - {% else %} - {{ category | append: ', '}} - {% endif %} - {% endfor %} + {{ page.categories | array_to_sentence_string }}