diff --git a/content/tags-list.njk b/content/tags-list.njk
index 3050c9c..a921496 100644
--- a/content/tags-list.njk
+++ b/content/tags-list.njk
@@ -5,7 +5,7 @@ layout: layouts/home.njk
Tags
-{% for tag in collections.all | getAllTags | filterTagList %}
+{% for tag in collections.all | getAllTags | filterTagList | sortAlphabetically %}
{% set tagUrl %}/tags/{{ tag | slugify }}/{% endset %}
- {{ tag }}
{% endfor %}
diff --git a/eleventy.config.js b/eleventy.config.js
index 3fba4b7..04c1b61 100644
--- a/eleventy.config.js
+++ b/eleventy.config.js
@@ -78,6 +78,10 @@ module.exports = function(eleventyConfig) {
return (tags || []).filter(tag => ["all", "nav", "post", "posts"].indexOf(tag) === -1);
});
+ eleventyConfig.addFilter("sortAlphabetically", strings =>
+ (strings || []).sort((b, a) => b.localeCompare(a))
+ );
+
// Customize Markdown library settings:
eleventyConfig.amendLibrary("md", mdLib => {
mdLib.use(markdownItAnchor, {