mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Bug #1047: templating toctree()'s includehidden argument
Document the includehidden option and give it sane defaults. See bug #1047 for implementation alternatives.
This commit is contained in:
parent
6748b60d39
commit
50fadb9e94
@ -391,3 +391,6 @@ are in HTML form), these variables are also available:
|
|||||||
|
|
||||||
* ``titles_only`` (false by default): if true, put only toplevel document
|
* ``titles_only`` (false by default): if true, put only toplevel document
|
||||||
titles in the tree
|
titles in the tree
|
||||||
|
|
||||||
|
* ``includehidden`` (false by default): if true, the TOC tree will also
|
||||||
|
contain hidden entries.
|
||||||
|
@ -653,6 +653,8 @@ class StandaloneHTMLBuilder(Builder):
|
|||||||
self.indexer.feed(pagename, title, doctree)
|
self.indexer.feed(pagename, title, doctree)
|
||||||
|
|
||||||
def _get_local_toctree(self, docname, collapse=True, **kwds):
|
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(
|
return self.render_partial(self.env.get_toctree_for(
|
||||||
docname, self, collapse, **kwds))['fragment']
|
docname, self, collapse, **kwds))['fragment']
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user