lewisdale.dev/config/filters/index.js
Lewis Dale 670acc7667
Some checks failed
Build and copy to prod / build-and-copy (push) Failing after 34s
Post about top Umami posts
2024-07-10 12:05:12 +01:00

16 lines
598 B
JavaScript

const dateFilters = require('./dates');
const arrayFilters = require('./arrays');
const excerptFilter = require('./excerpt');
const filterBy = require('./filterBy')
const getPost = require('./getPost');
module.exports = 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));
}