lewisdale.dev/config/filters/index.js

16 lines
598 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-12-30 15:38:09 +00:00
const filterBy = require('./filterBy')
2024-07-10 11:05:12 +00:00
const getPost = require('./getPost');
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-12-30 15:38:09 +00:00
eleventyConfig.addPlugin(filterBy);
2024-07-10 11:05:12 +00:00
eleventyConfig.addPlugin(getPost);
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
}