lewisdale.dev/config/filters/index.js
2023-12-30 15:38:09 +00:00

13 lines
520 B
JavaScript

const dateFilters = require('./dates');
const arrayFilters = require('./arrays');
const excerptFilter = require('./excerpt');
const filterBy = require('./filterBy')
module.exports = function(eleventyConfig) {
eleventyConfig.addPlugin(dateFilters);
eleventyConfig.addPlugin(arrayFilters);
eleventyConfig.addPlugin(excerptFilter);
eleventyConfig.addPlugin(filterBy);
eleventyConfig.addFilter('keys', obj => Object.keys(obj))
eleventyConfig.addFilter('json', obj => JSON.stringify(obj, null, 2));
}