Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: better Table of Contents (collapsible, auto-scroll, only some headings etc.) #158

Open
ManasMadrecha opened this issue Nov 26, 2021 · 3 comments
Labels

Comments

@ManasMadrecha
Copy link

Hi, first of all, thanks for this amazing extension 💛

It would be great to have some more features in the Table of Contents:

Auto scroll

  • As one scrolls the page, the TOC should also scroll to that respective heading's position.
  • This is enabled on several websites (e.g., Vue), and even in VS Code
  • Maybe it can be achieved using Intersection Observer

Collapsible Headings

  • For a document with several headings, the TOC can become very long.
  • So, it would be great to collapse the TOC to show only upto a certain heading, i.e. H2 or H3
  • It can be achieved by simply using details tag in the TOC's headings texts.

TOC Headings option

  • If the collapsible option is present, then that's great
  • If not, then the extension should an option to choosing the order up to which headings should be generated.
  • E.g., one may not need H5 or H6 headings to clutter the TOC.

Thanks once again.

@simov
Copy link
Owner

simov commented Nov 27, 2021

These are all really great suggestions, thank you!

@simov simov added the feature label Nov 27, 2021
@giuseppe-dandrea
Copy link

#190 I implemented the collapsible toc, I'm using it for a while now and it's really useful when the toc is big.

@simov simov added content and removed feature labels Dec 20, 2022
@simov
Copy link
Owner

simov commented Mar 18, 2023

The Auto Scroll item was fixed in v5.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants