mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 12:09:26 +00:00
Add log filter for easier debugging of templates
This commit is contained in:
@@ -46,6 +46,10 @@ export default function (eleventyConfig) {
|
||||
return typeof content === 'string' ? content.replace(/^(\s|\|)/g, '').replace(/(\s|\|)$/g, '') : content;
|
||||
});
|
||||
eleventyConfig.addFilter('keys', obj => Object.keys(obj));
|
||||
eleventyConfig.addFilter('log', (firstArg, ...rest) => {
|
||||
console.log(firstArg, ...rest);
|
||||
return firstArg;
|
||||
});
|
||||
|
||||
// Shortcodes - {% shortCode arg1, arg2 %}
|
||||
eleventyConfig.addShortcode('cdnUrl', location => {
|
||||
|
||||
Reference in New Issue
Block a user