Sidebar for navigation within a longer post

I have a software blog I host myself using WriteFreely, and found that currently it’s a little hard to navigate between sections inside a long post with multiple headings. One could manually write down links to each section in Markdown (which I have been doing), but a sticky hamburger menu (or sidebar nav) with a table of contents would be nice to have, as in Docsify.js.

Headings are already given unique IDs currently, allowing navigation to a section with blog.example.com/some_post_slug#section_heading_id. Gathering the headers inside a post and displaying a list of links to each heading should work.

Rendering links along with headers, e.g. {...}</h1><a href="#heading_id">⛓️</a> would also be nice, as it would allow readers to share a link to a section of interest. Read The Docs has this, with the link only visible on hover.

Having a sticky sidebar/hamburger menu would also allow for adding site-wide functionalities that are much easier to access without having to scroll to the top or the bottom of the page. A “share this page” button (using navigator.share()) comes up to my mind at the moment.

If this feature doesn’t go against WriteFreely’s aims, I might as well take a look at implementation. But implementing a new, site-wide nav element is not a trivial change (not of difficulty, but of impacting multiple files that others have also been working on) so I’m a bit cautious.