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:
parent
34cc0b2b8b
commit
c3b327dbe7
|
@ -5,10 +5,16 @@
|
|||
</a>
|
||||
</h2>
|
||||
<span class="post-category">
|
||||
<span class="label">
|
||||
{% for category in post.categories %}
|
||||
<span class="label">{{ category }}</span>
|
||||
{% if forloop.last %}
|
||||
{{ category }}
|
||||
{% else %}
|
||||
{{ category | append: ', '}}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</span>
|
||||
</span>
|
||||
<div class="post-meta">
|
||||
<span class="post-date">
|
||||
{{ post.date | date_to_string }}
|
||||
|
|
|
@ -8,10 +8,16 @@ layout: news
|
|||
<a href="{{ page.url }}" class="permalink" title="Permalink">∞</a>
|
||||
</h2>
|
||||
<span class="post-category">
|
||||
<span class="label">
|
||||
{% for category in page.categories %}
|
||||
<span class="label">{{ category }}</span>
|
||||
{% if forloop.last %}
|
||||
{{ category }}
|
||||
{% else %}
|
||||
{{ category | append: ', '}}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</span>
|
||||
</span>
|
||||
<div class="post-meta">
|
||||
<span class="post-date">
|
||||
{{ page.date | date_to_string }}
|
||||
|
|
Loading…
Reference in New Issue