_includes/post-meta.html in alembic-jekyll-theme-2.3 vs _includes/post-meta.html in alembic-jekyll-theme-2.3.1
- old
+ new
@@ -1,3 +1,15 @@
+{% if page.categories %}
+ {% capture categories %}
+ {% for category in page.categories %}
+ <span class="label label--category"><a href="{{ site.baseurl }}/categories#{{ category | downcase }}">{{ category }}</a></span>{% if forloop.last == false %},{% endif %}
+ {% endfor %}
+ {% endcapture %}
+{% elsif page.category %}
+ {% capture categories %}
+ <span class="label label--category"><a href="{{ site.baseurl }}/categories#{{ page.category | downcase }}">{{ page.category }}</a></span>
+ {% endcapture %}
+{% endif %}
+
<small class="small post-meta">
- {% if page.category %}<span class="label label--category"><a href="{{ site.baseurl }}/categories#{{ page.category | downcase }}">{{ page.category }}</a></span> · {% endif %}<time datetime="{{ page.date | date_to_xmlschema }}" class="time">{{ page.date | date_to_string }}</time>
+ {{ categories | append: " · " }}<time datetime="{{ page.date | date_to_xmlschema }}" class="time">{{ page.date | date_to_string }}</time>
</small>