You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
623 B
12 lines
623 B
{% capture category %}{% if post %}{{ post.categories | category_links | size }}{% else %}{{ page.categories | category_links | size }}{% endif %}{% endcapture %}
|
|
{% unless category == '0' %}
|
|
{% if post %}
|
|
{% for category in post.categories %}
|
|
<a href="{{ root_url }}/{{ site.category_dir }}/{{ category | split: " " | join: "-" }}/"><span class="badge">{{ category }}</span></a>
|
|
{% endfor %}
|
|
{% else %}
|
|
{% for category in page.categories %}
|
|
<a href="{{ root_url }}/{{ site.category_dir }}/{{ category | split: " " | join: "-" }}/"><span class="badge">{{ category }}</span></a>
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% endunless %}
|
|
|