lewisdale.dev/config/filters/index.js

12 lines
442 B
JavaScript
Raw Normal View History

2023-02-08 09:29:44 +00:00
const dateFilters = require('./dates');
2023-02-10 14:38:00 +00:00
const arrayFilters = require('./arrays');
const excerptFilter = require('./excerpt');
2023-02-08 09:29:44 +00:00
module.exports = function(eleventyConfig) {
eleventyConfig.addPlugin(dateFilters);
2023-02-10 14:38:00 +00:00
eleventyConfig.addPlugin(arrayFilters);
eleventyConfig.addPlugin(excerptFilter);
2023-02-13 13:35:44 +00:00
eleventyConfig.addFilter('keys', obj => Object.keys(obj))
eleventyConfig.addFilter('json', obj => JSON.stringify(obj, null, 2));
2023-02-08 09:29:44 +00:00
}