Skip to content

Commit

Permalink
lint code
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhunter08 committed Apr 24, 2024
1 parent 87d2137 commit eced23d
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,30 +40,30 @@ 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,
sections: config.sections.map((section) => ({
...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/
Expand Down

0 comments on commit eced23d

Please sign in to comment.