Closed samimaat closed 1 month ago
Hi Sami!
Have you already implemented the changes I made to the helper.js
file?
--> https://github.com/madrilene/eleventy-excellent/commit/84b0ea9d9267f922bf57420dfe357da33198b6f4#diff-d53ac0fd6115f1597a83a9e8e5825dc425b8b0cf9db4c82be6c4dd7d0c23f3ad
No, I haven't! Thanks. In this case the issue can be closed.
Firstly, thanks for the template!
I noticed when trying to implement a "draft mode" (11ty.dev) to the template that it doesn't build when the draft mode is on. I figured out that this is because the draft mode uses "permalink: false" in the mix.
This causes a build error with the helpers.js file in the getLinkActiveState function and in this part:
The error has to do with using pageUrl.indexOf on a permalink that doesn't exist or is set to false (I think). This can be fixed by using an if statement (or maybe something more elegant that I couldn't think of):
Together like this: