Skip to content

Commit

Permalink
Sort tags by default
Browse files Browse the repository at this point in the history
  • Loading branch information
tmaegel committed Nov 3, 2023
1 parent 937463e commit 4ab2ddc
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion themes/custom/static/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ footer {

.tags,
.categories {
margin-right: 8px;
margin-right: 2px;
}

.align-left {
Expand Down
4 changes: 3 additions & 1 deletion themes/custom/templates/article.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ <h4>
</section>
{% if article.tags %}
<div>
{% for tag in article.tags %}<a class="secondary tags" href="{{ SITEURL }}/{{ tag.url }}">#{{ tag }}</a>{% endfor %}
{% for tag in article.tags|sort %}
<a class="secondary tags" href="{{ SITEURL }}/{{ tag.url }}">#{{ tag }}</a>
{% endfor %}
</div>
{% endif %}
{% endblock %}
4 changes: 3 additions & 1 deletion themes/custom/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ <h3>
<h4>
{% if article.tags %}
<div>
{% for tag in article.tags %}<a class="secondary tags" href="{{ SITEURL }}/{{ tag.url }}">#{{ tag }}</a>{% endfor %}
{% for tag in article.tags|sort %}
<a class="secondary tags" href="{{ SITEURL }}/{{ tag.url }}">#{{ tag }}</a>
{% endfor %}
</div>
{% endif %}
</h4>
Expand Down
4 changes: 3 additions & 1 deletion themes/custom/templates/tags.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
<h3>Tags</h3>
</header>
<section>
{% for tag, articles in tags|sort %}<a class="tags" href="{{ SITEURL }}/{{ tag.url }}">#{{ tag }}</a>{% endfor %}
{% for tag, articles in tags|sort %}
<a class="secondary tags" href="{{ SITEURL }}/{{ tag.url }}">#{{ tag }}</a>
{% endfor %}
</section>
{% endblock %}

0 comments on commit 4ab2ddc

Please sign in to comment.