facebook / facebook/docusaurus

Table Of Contents: Allow user to collapse Table of Contents

オープン
#10,272 コメント 1 件 リアクション 5 件 担当者 0 名 GitHub で見る
feature
主要言語
TypeScript
スター
66.2k
フォーク
10k
平均マージ
1日 3時間
マージ済み PR(30日)
52

説明

### Have you read the Contributing Guidelines on issues?

- [X] I have read the [Contributing Guidelines on issues](https://github.com/facebook/docusaurus/blob/main/CONTRIBUTING.md#issues).

### Description

Here is something similar implemented in Mkdocs: https://github.com/squidfunk/mkdocs-material/issues/3428

Currently, we have collapsable sidebar but there is no option to collapse the "Table Of Contents".

### Has this been requested on Canny?

https://docusaurus.io/feature-requests/p/can-the-table-of-contents-be-collapsible

### Motivation

The motivation of this proposal is to allow users to enter full screen mode / focus mode for reading docs and not get distracted by sidebar / table of contents.

### API design

https://github.com/squidfunk/mkdocs-material/issues/3428#issuecomment-1565389397

### Have you tried building it?

No, not yet but I will try to swizzle the component for "Table Of Contents". If that works, I will add a comment here or raise a pull request myself.

### Self-service

- [X] I'd be willing to contribute this feature to Docusaurus myself.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。