[Wiki] Add a way to have the sidebar shows the TOC of the current page
Problem to solve
The current default sidebar lists all the pages in the wiki, which is not very useful once there are 50+ pages in the wiki. Our wiki users don't use it. All the main pages are listed on the home. Then they just follow the links inside the pages (related topics, more details about the current topic, etc) and so navigate from one page to another while reading the content of the pages.
On the contrary, something that would be very useful for us would be able to have the TOC of the current page in the sidebar (like you have on your handbook, for instance here). We are currently using [[_TOC_]]
at the top of all our pages, but it's not convenient because we need to go back to the top of the page every time we want to see the structure of the page and/or navigate to another section. Having it on the sidebar would completely solve that UX issue.
I saw the following note at the bottom of the documentation of the wiki, but I'm not sure it's about the TOC of the current page:
Support for displaying a generated TOC with a custom side navigation is planned.
I couldn't find an existing issue about that proposal.
Intended users
Wiki users.
We use a self-hosted GitLab CE but I think that feature could be useful for any version of GitLab.
Proposal
I was thinking it could use the custom sidebar mechanism. For instance:
### Menu
- [Page 1](page1)
- [Page 2](page2)
- [Page 3](page3)
---
### On this page
[[_TOC_]]
Otherwise it could be a setting somewhere, like a select. For instance:
Wiki - Content of the sidebar:
- List the pages of the wiki
- List the sections of the current page