Closed peekxc closed 2 weeks ago
(this might be a question for @Zearin)
Update!
From scanning the source, I've figured out that the following works in v3:
eleventyConfig.addPlugin(pugPlugin, {
globals: ['filters'],
debug: false,
filters: eleventyConfig.getFilters({ type: "sync" }),
});
Presumeably, this needs to be done after filters have been added, a la:
eleventyConfig.addFilter("readingTime", reading_time);
Usage is now identical to the globals trick from v2 mentioned in #1
To add arbitrary JS functions in V2 to pug, e.g.
It was sufficient to add:
This seems to no longer work. How can I add filters to use with pug in v3 (beta)?
So far my best attempt was:
But this did not work. Based on these docs is this just not supported yet?