update non-default tag page

This commit is contained in:
welpo 2024-06-29 17:37:39 +02:00
parent f6b60f3dc8
commit 0f88ece9b1
No known key found for this signature in database
GPG key ID: A2F978CF4EC1F5A6

View file

@ -7,6 +7,11 @@
{{ macros_page_header::page_header(title=title)}}
{% set tag_count = terms | length %}
{% if config.extra.tag_sorting == "frequency" %}
{% set terms = terms | sort(attribute="pages") | reverse %}
{% elif config.extra.tag_sorting != "name" %}
{{ throw (message="Invalid tag_sorting option: " ~ config.extra.tag_sorting ~ ". Valid options are 'name' and 'frequency'.") }}
{% endif %}
<div id="tag-cloud" class="{% if tag_count > 16 %}three-columns{% elif tag_count > 8 %}two-columns{% endif %}">
<ul class="tags">
{%- for term in terms -%}