lewisdale.dev/config/filters/index.js
2023-12-26 14:35:09 +00:00

12 lines
442 B
JavaScript

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