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.8.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.8-py3-none-any.whl (17.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sphinx_filtered_toctree-0.0.8.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.8.tar.gz
Algorithm Hash digest
SHA256 bb6a0c9f9c4b28d484f5cd2cef2bd99f8abf943b3e9c14f2f9a510201edc0f9f
MD5 cb7e59b15b5b7f92828ab8ff3094b063
BLAKE2b-256 fa84638b6d1438a3cca9dbee59e18826d1aa25007f4c88be054855536c443b72

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for sphinx_filtered_toctree-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 31b91710d4295b40a82df8404a0c7862084fbf350c58391176674c9a61eb54a2
MD5 cee01efc9736e87528e44a4ddacfe9cf
BLAKE2b-256 60b155e52618ccda045ff0012ded2d3bc85eafe2c64c90cec7007cf1aeb4b219

See more details on using hashes here.

Provenance

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