Sphinx Extension to create a fake expandable table of contents. It is recommended to :orphan: any page where mimic is used to avoid any unexpected behavior.
python -m pip install sphinxext-mimic
- Sphinx >= 3
Add sphinxext.mimic to your extensions list in your conf.py
extensions = [
sphinxext.mimic,
]Then use
.. mimictoc::
which is compatible with the default .. toctree:: arguments.