Skip to main content

Sphinx toctree that filters out entries by prefix.

Project description

sphinx-filtered-toctree

sphinx-filtered-toctree allows you to filter pages out of your documentation's navigation by prefixing ToC entries with configurable tags.

Basic usage

First, list the tags you wish to exclude with toc_filter_exclude in your conf.py file:

toc_filter_exclude = ["exclude", "hidden"]

To filter entries out of your documentation's navigation, prefix either the document's label or target with one of the tags defined in toc_filter_exclude:

.. filtered-toctree::

    :exclude:how-to-code
    Unit testing <:hidden:unit-testing>

Aside from this added functionality, filtered-toctree behaves exactly the same as the toctree directive.

Project setup

sphinx-filtered-toctree is published on PyPI and can be installed with:

pip install sphinx-filtered-toctree

After adding filtered-toctree to your Python project, update your Sphinx's conf.py file to include filtered-toctree as one of its extensions:

extensions = [
    "sphinx_filtered_toctree"
]

Community and support

You can report any issues or bugs on the project's GitHub repository.

filtered-toctree is covered by the Ubuntu Code of Conduct.

License and copyright

sphinx-filtered-toctree is released under the GPL-3.0 license.

© 2025 Canonical Ltd.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sphinx_filtered_toctree-0.0.9.tar.gz (71.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sphinx_filtered_toctree-0.0.9-py3-none-any.whl (17.0 kB view details)

Uploaded Python 3

File details

Details for the file sphinx_filtered_toctree-0.0.9.tar.gz.

File metadata

  • Download URL: sphinx_filtered_toctree-0.0.9.tar.gz
  • Upload date:
  • Size: 71.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sphinx_filtered_toctree-0.0.9.tar.gz
Algorithm Hash digest
SHA256 3cceb1242cde5a56b81206972dd1ad64ddb6cbd37e1fc6fcd3625655e4c797ce
MD5 498c7b90d20864986d4cf0d56f533c06
BLAKE2b-256 ebd38863d8de0e8e3cdc1bcdf9abc073b8d214ece818f6c0f9571a2e85e4a7ce

See more details on using hashes here.

Provenance

The following attestation bundles were made for sphinx_filtered_toctree-0.0.9.tar.gz:

Publisher: release-publish.yaml on canonical/sphinx-filtered-toctree

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sphinx_filtered_toctree-0.0.9-py3-none-any.whl.

File metadata

File hashes

Hashes for sphinx_filtered_toctree-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 a7c069bdca23ee647506877e5255f82c5da374b448ad97961ba32718fac15910
MD5 c63c57a83643951027b2d0e95d4fd509
BLAKE2b-256 448005561f4c05fdf535cd2728992f54c0927b2be96f2baa67f04cbc1b6e90bd

See more details on using hashes here.

Provenance

The following attestation bundles were made for sphinx_filtered_toctree-0.0.9-py3-none-any.whl:

Publisher: release-publish.yaml on canonical/sphinx-filtered-toctree

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page