The component overrides bug

2024-04-08 05:42:00 +07:00 by Mark Smith

The component overrides bug that I tracked down and fixed yesterday was a real tricky one. The bug got introduced while I was digging myself out of the massive hole caused by being blocked from cleaning up the codebase. It's layers upon layers of irony at this point.

Turns out you can't currently override core components, something that needs to change, because you should be able to override any components with your own ones. Core components, by the way, are ones included in the main static site generator app. It's quite an easy update but not a priority right now.

Anyway I wrote some additional tests in the main static site generator code, one of which was for overriding. Problem was I had forgotten about the core components special case, and the test was doing exactly that, overriding a core component. I got the test working, but it broke the feature everywhere else. The result in my website was that none of my custom components, were being picked up. The most notable consequence being the removal of multi-paragraph notes, which is a special feature I added to my website, outside of the notes plugin.

There are quite a few customisations like this that I've added on my website. It's easier to do it there since that's the only live site at the minute. The plan is at some point to move all the custom features that make sense to be in the plugins, to the actual plugins. But it's not a priority. I have much bigger, much more important things to get right first. The interleaved homepage is one of those.

Strange that the world seems so intent on blocking me from finishing the interleaved homepage, while at the same time forcing me to move my custom functionality into the plugins. Why in heavens would that happen? It feels like something in the universe is conflicted.

Life goes on. Hopefully no starvation and thirst today.

For enquiries about my consulting, development, training and writing services, aswell as sponsorship opportunities contact me directly via email. More details about me here.