Ahrefs TOC with accordion

I’m a big fan of the AHREFs table of contents styling. Anyone know how we could adopt something similar on Ghost?

This could be done with JavaScript and saved as a snippet.

Or there may be third party Table of Contents Generator JavaScript you could add to your theme for this.

That is a nice implementation. You could achieve something similar by modifying our table of contents tutorial:

In that tutorial, we use the Tocbot library, which has a wealth of options for customization: