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

More TOC options (to integrate in-page TOC into the global TOC & make global TOC's top-level items link to article) #3815

Closed
tomchen opened this issue Nov 25, 2020 · 2 comments
Labels
closed: duplicate This issue or pull request already exists in another issue or pull request feature This is not a bug or issue with Docusausus, per se. It is a feature request for the future.

Comments

@tomchen
Copy link

tomchen commented Nov 25, 2020

🚀 Features

Options to add:

  1. Could there be an option to control whether in-page headings TOC on the right is integrated into the global TOC on the left? VuePress, Docsify and vuejs.org/v2/guide put the two TOC together as one.
  2. In the global TOC on the left of the page, could we be able to make top-level links (or any parent items) real article links? I mean, for example, on v2.docusaurus.io/docs, visitor clicks "Docusaurus", "Getting Started", "Guides" and "Advanced Guides", the collapsable sublist will show or hide, but the page will not change. However, there could be a scenario where we want to make "Docusaurus", "Getting Started" real article links so that the visitors clicking them will go to another article page. It's just like gatsbyjs.com/docs.

Have you read the Contributing Guidelines on issues?

Yes

Motivation, pitch and other comment

These options allow more customization, so users who want to have similar TOC as in those documentation sites and generators I mentioned could do it.

I was about to mention 4 TOC-related options in this proposal/request. Then I found two of them (which I think more crucial than the other two I mentioned above) have already been posted in #2700 and #2220 (both are open).

I think an ideal design is that my proposals 1 and 2 could work together with #2700, #2220 and other existing TOC options, so user could fully control what to include in TOC and where to put them.

For example, my option 1 proposed could make the headache in #2220 less painful. (#2220: in V2, no way to view the in-page headings TOC in mobile screen. There are already a hamburg button for top menu and another hamburg button for global TOC, should we add a third for in-page headings TOC? If we are able to integrate in-page headings TOC into the global TOC (which is my option 1), there will be at most two hamburg buttons. And to add my option 1, it looks like my option 2 will have to be enabled)

Yes, these features will require some work but just put them into the (long-term) to do list maybe.

@tomchen tomchen added feature This is not a bug or issue with Docusausus, per se. It is a feature request for the future. status: needs triage This issue has not been triaged by maintainers labels Nov 25, 2020
@slorber
Copy link
Collaborator

slorber commented Dec 29, 2020

Going to close as duplicate of existing issues you mentionned.

Please open issues to discuss a specific problem, and if issues already exist, then add your contribution to the existing issue.

Until we have a better mobile experience, you can use the new inline TOC component to make the TOC available on mobile.

https://v2.docusaurus.io/docs/markdown-features/#inline-table-of-contents

(you can decide yourself if you want to hide it for certain screen widths)

@slorber slorber closed this as completed Dec 29, 2020
@slorber
Copy link
Collaborator

slorber commented Dec 29, 2020

Also, you may be looking for sidebar categories as document links, for which there is also a issue: #2643

@Josh-Cena Josh-Cena added closed: duplicate This issue or pull request already exists in another issue or pull request and removed status: needs triage This issue has not been triaged by maintainers labels Mar 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed: duplicate This issue or pull request already exists in another issue or pull request feature This is not a bug or issue with Docusausus, per se. It is a feature request for the future.
Projects
None yet
Development

No branches or pull requests

3 participants