For the case when more than one category specified in the news item, make sure category names formatted nicely with comma delimiter like this: category1, category2. Instead of categor1category2.

This commit is contained in:
pilosus 2014-04-01 16:04:51 +02:00
parent 34cc0b2b8b
commit c3b327dbe7
2 changed files with 18 additions and 6 deletions

View File

@ -5,10 +5,16 @@
</a> </a>
</h2> </h2>
<span class="post-category"> <span class="post-category">
<span class="label">
{% for category in post.categories %} {% for category in post.categories %}
<span class="label">{{ category }}</span> {% if forloop.last %}
{{ category }}
{% else %}
{{ category | append: ', '}}
{% endif %}
{% endfor %} {% endfor %}
</span> </span>
</span>
<div class="post-meta"> <div class="post-meta">
<span class="post-date"> <span class="post-date">
{{ post.date | date_to_string }} {{ post.date | date_to_string }}

View File

@ -8,10 +8,16 @@ layout: news
<a href="{{ page.url }}" class="permalink" title="Permalink"></a> <a href="{{ page.url }}" class="permalink" title="Permalink"></a>
</h2> </h2>
<span class="post-category"> <span class="post-category">
<span class="label">
{% for category in page.categories %} {% for category in page.categories %}
<span class="label">{{ category }}</span> {% if forloop.last %}
{{ category }}
{% else %}
{{ category | append: ', '}}
{% endif %}
{% endfor %} {% endfor %}
</span> </span>
</span>
<div class="post-meta"> <div class="post-meta">
<span class="post-date"> <span class="post-date">
{{ page.date | date_to_string }} {{ page.date | date_to_string }}