Tocbot is a JavaScript library that I’ve used on several projects to produce a really nice table of contents with scrollspy and other potential features. The downside, of course, is that Tocbot generates the table of contents at page load time, whereas in Hugoworld we always prefer to do as much as humanly possible at build time.
Have any of you managed to get Tocbot-style functionality just using .TableOfContents
, CSS, and JavaScript? I would definitely love to remove Tocbot from my stack if at all possible.
I have some ideas for how to make this happen but it never hurts to ask this great community first!