DannyBen / madness

Instant Markdown Server
https://madness.dannyb.co
MIT License
125 stars 17 forks source link

Add table of content pane #182

Open marszub opened 1 month ago

marszub commented 1 month ago

On the most common screen resolution i.e. 1920x1080 there is plenty of space on the sides of current content. Auto-generated table of content (TOC) that floats while scrolling the actual content would be very useful for navigation. It can be another toggle in server configuration. Since <!-- TOC --> tag is already supported, the TOC on the side can be generated the same way including links to headers. The TOC files should not be saved in the documentation dir to not create mess.

DannyBen commented 1 month ago

I will look into it. If implemented, it would probably be a setting to determine the position of the HTML snippet generated with <!-- TOC -->. Most likely be a CSS class added to this block that will make it float instead of part of the page.