From bfe7cd148eb7e473c3672e0bb14cc7fda7260f24 Mon Sep 17 00:00:00 2001 From: Oscar Date: Tue, 12 Nov 2019 15:08:40 +0100 Subject: [PATCH] feat(11ty): add filter for post inspection and linkTarget --- .eleventy.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.eleventy.js b/.eleventy.js index baecb1b6..06afb7e9 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -1,6 +1,13 @@ module.exports = function (config) { // Add a filter using the Config API - // config.addFilter("myFilter", function () { }); + config.addFilter('linkTarget', (slug) => `#${slug}`); + + config.addFilter('postInspect', function (post) { + console.log(post); + + }) + + config.addPassthroughCopy({'_site/css/': 'assets/css/'}) // Add collections here config.addCollection('definitions', collection => {