Rename item limit filter

This commit is contained in:
Helen Chong 2024-04-17 00:03:41 +08:00
parent 5e195da5ab
commit 743617d340
1 changed files with 3 additions and 3 deletions

View File

@ -121,9 +121,9 @@ module.exports = function (eleventyConfig) {
return dateTimeLocale.format(date);
});
// Filter: Limit
eleventyConfig.addFilter("limit", function(array, limit) {
return array.slice(0, limit);
// Filter: Limit number of items displayed
eleventyConfig.addFilter("itemLimit", function(array, itemLimit) {
return array.slice(0, itemLimit);
});
return {