macros:post: sort tags alphabetically

Sort tags alphabetically before displaying them.
This commit is contained in:
Heitor Pascoal de Bittencourt 2023-04-23 17:17:03 -03:00
parent 8f549fea12
commit b1148b47ef
No known key found for this signature in database
GPG key ID: 2DD9C1566E2774A2

View file

@ -94,7 +94,7 @@
:: tags: 
{%- set sep = " " -%}
{% endif -%}
{%- for tag in page.taxonomies.tags %}
{%- for tag in page.taxonomies.tags | sort | unique(case_sensitive=false) %}
<a class="post-tag" href="{{ get_taxonomy_url(kind='tags', name=tag) | safe }}">#{{ tag }}</a>
{%- if not loop.last %}{{ sep | safe }}{% endif -%}
{% endfor -%}