メインの TOCTree から RST ファイルに存在する 1 つ (またはすべて) のサブセクションを非表示にすることは可能ですか?
もう少し説明しましょう:
index.rst
:doc:`Label <path/to/rst/file>`
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. toctree::
Label <path/to/rst/file>
Label <path/to/rst/file>
Label of Children TOCTree <path/to/rst/children/file>
children/file.rst
Children Title
==============
.. toctree::
Label of Grandchildren 1
Label of Grandchildren 2
Subsection 1
------------
Subsection 2
------------
Subsection 3
------------
これらのファイルは、ビルド後にメインの TOCTree になります。
- ラベル
- ラベル
- 子供のラベル
- 孫のラベル 1
- 孫のレーベル2
- 第1項
- 第2項
- 第3項
そして、サブセクションを非表示にして、TOCTree のみを保持し、必要な数と深さを維持したいと考えています。例えば:
- ラベル
- ラベル
- 子供のラベル
- 孫のラベル 1
- 孫のレーベル2
ただし、Label of Childrenに関連付けられたハイパーリンクをクリックすると、通常どおりサブセクションが一覧表示されます。