feedback
feedback copied to clipboard
Auto-Create a "Table of Content"
Is your feature request related to a problem? Please describe. Longer Notebooks often have many different sections. Getting an overview and navigating around such notebooks can often be time consuming and unpleasant.
Describe the solution you'd like GitHub recently launched "Table of Contents", which are automatically generated based on the markdown of README files. It would be fantastic to have this feature in the Observable notebooks to get a better first overview as well as to allow to move along the content fast. Maybe the table of content tab could even stick around as one scrolls, kind of like in Google Suite.
Describe alternatives you've considered Maybe internal linking would be possible. So basically that everyone can build their own table of content?
Additional context
EDITED
- 02/04/2021 - Added a GIF for clarification.
Current workaround: Use @mbostock/toc or a similar in-notebook table of contents generator.
@Daynex A table of contents is usually displayed inline, at the top of a document. However, you appear to be asking for a navigation element outside of the notebook body. Can you please add a screenshot of the feature to the description, so that this request can be understood without reviewing the tweet?
Maybe as another “tab” in the new navigation on next.observablehq.com
? that way it could be easily accessible without taking up space.
@Daynex A table of contents is usually displayed inline, at the top of a document. However, you appear to be asking for a navigation element outside of the notebook body. Can you please add a screenshot of the feature to the description, so that this request can be understood without reviewing the tweet?
Than you for the point, @mootari. I added a GIF to the description. Does it clarify?
I'd also love to see this feature!
The existing minimap could be augmented to support basic filtering by cell type, then the user could set it to display Markdown titles only. It could also nest titles automatically, similar to the GIF above.
Is it possible to have a Table of Contents (ToC) on the left of the page?
I have seen the tool to make toc in the page. import {toc} from "@nebrius/indented-toc"
But what if I want a toc docked on the left of the page which would not move with mouse?
Thanks. Scarlett
I wonder if this could be expanded into a custom docking zone. It could be used for TOC or other UI functions.