{% if include.post.tags %} {% if include.post.tags.size == 1 %} {{ include.post.tags.first }}. {% else %} {% assign penultimate = include.post.tags.size | minus: 2 %} {% for i in (0..penultimate) %} {% if include.post.tags.size == 2 %} {{ include.post.tags[i] }} {% else %} {{ include.post.tags[i] }}, {% endif %} {% endfor %} and {{ include.post.tags.last }}. {% endif %} {% endif %}