Skip to content

Commit

Permalink
Fix conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
zachleat committed Feb 5, 2025
1 parent dffcb2d commit 9baac5c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions _config/filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,7 @@ export default function(eleventyConfig) {
return (tags || []).filter(tag => ["all", "posts"].indexOf(tag) === -1);
});

eleventyConfig.addFilter("sortAlphabetically", strings =>
(strings || []).sort((b, a) => b.localeCompare(a))
);
};
2 changes: 1 addition & 1 deletion content/tags.njk
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<h1>Tags</h1>

<ul>
{% for tag in collections | getKeys | filterTagList %}
{% for tag in collections | getKeys | filterTagList | sortAlphabetically %}
{% set tagUrl %}/tags/{{ tag | slugify }}/{% endset %}
<li><a href="{{ tagUrl }}" class="post-tag">{{ tag }}</a></li>
{% endfor %}
Expand Down

0 comments on commit 9baac5c

Please sign in to comment.