{% capture tag_ %}{{ include.name | downcase | replace: " ", "_" }}{% endcapture %} {% assign badge = "badge-default" %} {% for category in site.data.categories %} {% if category.badge and tag_ == category.tag %} {% capture badge %}badge-{{ category.badge }}{% endcapture %} {% continue %} {% endif %} {% endfor %} {% for category in site.data.polemictweet %} {% if tag_ == category.tag %} {% capture badge %}badge-{{ category.id }}{% endcapture %} {% continue %} {% endif %} {% endfor %} {{ tag_ | replace: "_", " " }}