sort artists by name

This commit is contained in:
2026-05-05 14:25:50 -07:00
parent 1f2a828c66
commit ed33548adc
2 changed files with 6 additions and 1 deletions

View File

@ -26,4 +26,9 @@ export default function (eleventyConfig) {
return shuffledArray; return shuffledArray;
}); });
/* Sort alphabetically by item title */
eleventyConfig.addFilter("sortAlphabeticallyByTitle", collection => {
collection.sort((b, a) => b.data.title.localeCompare(a.data.title));
return collection;
});
}; };

View File

@ -6,5 +6,5 @@ eleventyNavigation:
key: 🎨 artists key: 🎨 artists
--- ---
{% set items = collections.residents | reverse %} {% set items = collections.residents | sortAlphabeticallyByTitle %}
{% include "directory.njk" %} {% include "directory.njk" %}