sort artists by name
This commit is contained in:
@ -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;
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@ -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" %}
|
||||||
|
|||||||
Reference in New Issue
Block a user