Skip to content

Add Gollum depth level support for Wikis Table of Contents [[TOC]]

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Having the ability to limit a _TOC_ depth is useful to show a more synthetic view of a page while keeping its deeply nested structure.

Although there is some sort of a workaround it doesn't render correctly in my situation (# appear when in a bold markdown). And breaks the hierarchical structure.

As it relies on the Gollum syntax it would be awesome to add the |levels = 2 optional tag.

Some other users report wanting to exclude specific titles from TOC. That's not my use case and it might be usefull although not supported bu Gollum unless mistaken.

Several issues have comments towards this :

And Gitlab's own about.gitlab.com has this option in a different manner see https://about.gitlab.com/handbook/engineering/ux/technical-writing/markdown-guide/#table-of-contents-toc

This seems as a pretty trivial point but has been upvoted quite consistently. Maybe the time has come... ?

Edited by 🤖 GitLab Bot 🤖