Fix conflicts

This commit is contained in:
Zach Leatherman 2025-02-05 15:11:15 -06:00
parent dffcb2d5ae
commit 9baac5c4e3
2 changed files with 4 additions and 1 deletions

View file

@ -37,4 +37,7 @@ export default function(eleventyConfig) {
return (tags || []).filter(tag => ["all", "posts"].indexOf(tag) === -1); return (tags || []).filter(tag => ["all", "posts"].indexOf(tag) === -1);
}); });
eleventyConfig.addFilter("sortAlphabetically", strings =>
(strings || []).sort((b, a) => b.localeCompare(a))
);
}; };

View file

@ -1,7 +1,7 @@
<h1>Tags</h1> <h1>Tags</h1>
<ul> <ul>
{% for tag in collections | getKeys | filterTagList %} {% for tag in collections | getKeys | filterTagList | sortAlphabetically %}
{% set tagUrl %}/tags/{{ tag | slugify }}/{% endset %} {% set tagUrl %}/tags/{{ tag | slugify }}/{% endset %}
<li><a href="{{ tagUrl }}" class="post-tag">{{ tag }}</a></li> <li><a href="{{ tagUrl }}" class="post-tag">{{ tag }}</a></li>
{% endfor %} {% endfor %}