diff --git a/.eleventy.js b/.eleventy.js index aebb822..12a53d8 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -40,16 +40,16 @@ export default function (eleventyConfig) { }) eleventyConfig.addFilter( - "addActiveAttribute", + 'addActiveAttribute', function (config, filePathStem) { if (config.items) { return { ...config, items: config.items.map((item) => ({ ...item, - active: filePathStem.indexOf(item.href) > -1, - })), - }; + active: filePathStem.indexOf(item.href) > -1 + })) + } } else if (config.sections) { return { ...config, @@ -57,13 +57,13 @@ export default function (eleventyConfig) { ...section, items: section.items.map((item) => ({ ...item, - active: filePathStem.indexOf(item.href) > -1, - })), - })), - }; + active: filePathStem.indexOf(item.href) > -1 + })) + })) + } } } - ); + ) // We need this HtmlBase plugin for serving our docs on github pages at a subdirectory // https://www.11ty.dev/docs/plugins/html-base/