sort by title, add og image and alt
This commit is contained in:
@ -75,4 +75,10 @@ export default function(eleventyConfig) {
|
||||
eleventyConfig.addFilter("sortAlphabetically", strings =>
|
||||
(strings || []).sort((b, a) => b.localeCompare(a))
|
||||
);
|
||||
|
||||
/* Sort alphabetically by item title */
|
||||
eleventyConfig.addFilter("sortAlphabeticallyByTitle", collection => {
|
||||
collection.sort((b, a) => b.data.title.localeCompare(a.data.title));
|
||||
return collection;
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user