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.1.0.tar.gz (103.7 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.1.0-py3-none-any.whl (17.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sphinx_filtered_toctree-0.1.0.tar.gz
  • Upload date:
  • Size: 103.7 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.1.0.tar.gz
Algorithm Hash digest
SHA256 897d07e168b6b3486aaef84ce017580a2668f5c2ed53d0c88478b7411591ee48
MD5 fa99b40b6bc63bed81aa8deba7e568d5
BLAKE2b-256 ab344d7b00b47d3a0b06b6660027a92a17a77824c26c9dd1372bedfaf797f79c

See more details on using hashes here.

Provenance

The following attestation bundles were made for sphinx_filtered_toctree-0.1.0.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.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sphinx_filtered_toctree-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 34b9ab56ccea36800837930b5020d74084742afa305cb467591081d1638a9933
MD5 8128bbc38916ba039f8792e86181f9b7
BLAKE2b-256 6c35df331d2c25c62c4fa127dffe37cb92c3d0acef80c6cc030d78d88a01bcff

See more details on using hashes here.

Provenance

The following attestation bundles were made for sphinx_filtered_toctree-0.1.0-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