Skip to content

pdehaan/11ty-nunjucks-sort-test

Repository files navigation

11ty-nunjucks-sort-test

Testing the Nunjucks sort filter in Eleventy for sorting arrays of numbers, strings, and objects.

{{ arr | sort(reverse=false, caseSens=false, attr) }}

Sort arr with JavaScript's arr.sort function. If reverse is true, result will be reversed. Sort is case-insensitive by default, but setting caseSens to true makes it case-sensitive. If attr is passed, will compare attr from each item.

About

Testing the Nunjucks sort filter in Eleventy

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published