1. Georg Brandl
  2. sphinx


Roland Meister  committed 0132bf1

Bug #1047: templating toctree()'s includehidden argument

Document the includehidden option and give it sane defaults.
See bug #1047 for implementation alternatives.

  • Participants
  • Parent commits 46ee365
  • Branches default

Comments (0)

Files changed (2)

File doc/templating.rst

View file
    * ``titles_only`` (false by default): if true, put only toplevel document
      titles in the tree
+   * ``includehidden`` (false by default): if true, the TOC tree will also
+     contain hidden entries.

File sphinx/builders/html.py

View file
             self.indexer.feed(pagename, title, doctree)
     def _get_local_toctree(self, docname, collapse=True, **kwds):
+        if 'includehidden' not in kwds:
+            kwds['includehidden'] = False
         return self.render_partial(self.env.get_toctree_for(
             docname, self, collapse, **kwds))['fragment']