-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
ISSUE
This issue (or a similar one) was raised 5 years ago over here.
I want to make it clearer as to exactly what I would love for to be added as a feature as it would be a great interface.
In today's documentation websites, nearly ALL sites have a TOC (table of contents) to the Right-Hand-Side of the page (and sometime to the left), which list all the Headings
of the page (i.e. h1
, h2
, h3
, ...) for easier in-page navigation as shown below: (the image is from this site)
Usefulness
It is useful since sometimes you CANNOT divide that page into sub-sections within the MAIN TOC because it doesn't make sense. For example, in a single page we have an explanation of a concept that has a number of sections that make sense only on a single page, then the page might get a bit long, but not long enough to justify splitting it into multiple pages, which requires extensive scrolling to get from one part of the page to another. A simple example
Implementation ideas
I am suggesting that a similar feature be added to this repo:
- which is enabled by default and can be disabled optionally
- we can add a button which can hide the in-page TOC
There are a number of design ideas (I obtained from other sites):
Original page
This is the ORIGINAL:
- We move the left & right page navigation button to the
top bar
(which makes more sense anyway, since they aren't used too frequently, in my experience), so we now have more screen space - Then we add the page TOC to the right hand side with all
h1
shown and they can further be expanded to showh2
and they can be expanded to showh3
and so on... - This is not shown in picture, but a hamburger menu could toggle the
page TOC
on and off.
modified page 1
This is a mock UI (not really good looking):
modified page 2
We can further make sure that the left and right page navigation button make more sense by changing the title of the page from the book to that of the page and moving the title of the book into the sidebar (main TOC
) as shown in figure below:
These are just suggestions as to the proposed UI. I highly recommend checking out This page and This page to understand the complete experience. I thank this team for considering this feature in advance. I think I followed all guideline