lewisdale.dev/config/filters/index.js
Lewis Dale e0c315d837
Some checks failed
Build and copy to prod / build-and-copy (push) Has been cancelled
Upgrade to Eleventy 3.0.0
2024-10-06 12:36:54 +01:00

16 lines
587 B
JavaScript

import dateFilters from './dates.js';
import arrayFilters from './arrays.js';
import excerptFilter from './excerpt.js';
import filterBy from './filterBy.js';
import getPost from './getPost.js';
export default function(eleventyConfig) {
eleventyConfig.addPlugin(dateFilters);
eleventyConfig.addPlugin(arrayFilters);
eleventyConfig.addPlugin(excerptFilter);
eleventyConfig.addPlugin(filterBy);
eleventyConfig.addPlugin(getPost);
eleventyConfig.addFilter('keys', obj => Object.keys(obj))
eleventyConfig.addFilter('json', obj => JSON.stringify(obj, null, 2));
}