module.exports = function (eleventyConfig) { eleventyConfig.addFilter('excerpt', (content, limit = 250) => { const withoutTags = content.replace(/(<([^>]+)>)/gi, ""); if (withoutTags.length > limit) { return withoutTags.slice(0, limit) + " […]"; } return withoutTags; }); }