Refactoring the shadowmaker has become a bigger headache than I had originally anticipated, but it’s for the long-term health of the system, so I’m sticking to my guns. This weekend added further drama when I finally stopped running away from frontmatter and embraced it for all my metadata. Sure, scattering #ch-command directives throughout the body of the notes was insane, but fixing it is going to mean more than just adding a few metadata fields. I may have to completely change the way I use Obsidian.
As I continue to explore the lightbi theme, I’m noticing that it doesn’t implement collapsing menus. You can define a hierarchical page structure in the config file (explicitly) but it doesn’t get displayed in an elegant, “click to reveal” kinda way. Worse, I need a mechanism that discovers the structure dynamically, not by hard coding in the config. But fortunately, I might have found a solution.
◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇
I just stumbled on this Hugo partial for dynamic menu discovery and display. It is dynamic, but it expands and collapses inline, rather than in a pop-up.
I also found this short -code solution for doing general collapsible content, but it too appears to be inline.
Here’s a coding technique for telling Hugo that your menu item has children, but I’m not sure how it effects rendering.
This brief article at least talks about solving the problem with dynamic collapsing menus, but is a bit light on implementation deets.
Here’s an explainer article seems to do a good job covering a variety of methods for building different types on menus in Hugo.
And this documentation page discusses how menus are declared, what options are available, and has links to some rendering template examples.
Update
I asked on the lightbi user’s discussion board but haven’t heard any suggestions.
This thread (for a different base theme) suggests swapping out the theme’s nav partial and replacing it with a bootstrap navbar, which looks like a good starting point for creating my own solution in a hugoic fashion.