{% if page.categories %}
  {% capture categories %}
    {% for category in page.categories %}
      <span class="label  label--category">{{ category }}</span>{% if forloop.last == false %},{% endif %}
    {% endfor %}
  {% endcapture %}
{% elsif page.category %}
  {% capture categories %}
    <span class="label  label--category">{{ page.category }}</span>
  {% endcapture %}
{% endif %}

<small class="small  post-meta">
  {{ categories | append: "&nbsp;&middot;&nbsp;" }}<time datetime="{{ page.date | date_to