trenz-gmbh / trenz-docs

An SPA wiki made by TRENZ
MIT License
3 stars 0 forks source link

Automatic ToC #42

Closed ricardoboss closed 1 year ago

ricardoboss commented 2 years ago

An automatic/generated table of contents (preferably post-index creation, i.e. generated by the client) would be nice.

It is a feature available in MediaWiki that gets lost when importing content. One to implement this is by simply post-process the generated HTML by markedjs and scan for headings and build a nested, ordered list from that.

The list could then either be inserted just below the first heading or just at the top of the page. It would also be nice to have a trigger token which initiates the generation in the first place (something like [toc]).