{"id":24625,"library":"sphinx-remove-toctrees","title":"sphinx-remove-toctrees","description":"A Sphinx extension that allows you to remove toctrees from certain pages to reduce documentation build size. Current version: 1.0.0.post1. Maintained by the ExecutableBooks project, infrequent releases.","status":"active","version":"1.0.0.post1","language":"python","source_language":"en","source_url":"https://github.com/executablebooks/sphinx-remove-toctrees","tags":["sphinx","extension","documentation","toctree"],"install":[{"cmd":"pip install sphinx-remove-toctrees","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required extension.","package":"sphinx","optional":false}],"imports":[{"note":"No common import mistakes; extension added via conf.py entry point, not direct import.","wrong":"","symbol":"sphinx_remove_toctrees","correct":"import sphinx_remove_toctrees"}],"quickstart":{"code":"extensions = ['sphinx_remove_toctrees']\n# exclude specific pages from having toctrees\nremove_toctrees_from = ['page_to_remove.rst', 'another_page.rst']","lang":"python","description":"Enable the extension and configure which pages to remove toctrees from via the 'remove_toctrees_from' list."},"warnings":[{"fix":"Use e.g. 'page_without_toctree' not 'source/page_without_toctree.rst'.","message":"The 'remove_toctrees_from' config value expects a list of document names (without .rst/.md extension) relative to source directory. Including extensions or full paths will silently fail.","severity":"gotcha","affected_versions":"all"},{"fix":"Only apply to pages where toctree is unnecessary (e.g., standalone content pages).","message":"This extension removes the toctree directive from pages entirely, not just hiding it. Navigation may be affected if those pages are expected to display subpages.","severity":"gotcha","affected_versions":"all"},{"fix":"Use 'remove_toctrees_from' in conf.py.","message":"In version 0.0.3, the configuration option was renamed from 'remove_toctrees_from' (previously 'exclude_toctrees'). The old name may still work but is undocumented.","severity":"deprecated","affected_versions":"<0.0.3"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Add 'remove_toctrees_from = []' to conf.py even if empty, or check spelling.","cause":"Configuration option not defined in conf.py or misspelled.","error":"KeyError: 'remove_toctrees_from' not in config"},{"fix":"Ensure pages with removed toctrees are not listed as toctree entries elsewhere, or use Sphinx's 'orphan' directive.","cause":"Removing a toctree from a page that is included via another toctree may cause orphaned references.","error":"WARNING: toctree is missing from page, but referenced in ..."},{"fix":"Run 'pip install sphinx-remove-toctrees' and ensure conf.py has 'extensions = ['sphinx_remove_toctrees']'.","cause":"Wrong import or the package is not installed.","error":"Extension 'sphinx_remove_toctrees' has no setup() function"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}