Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion alabaster/navigation.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<h3>{{ _('Navigation') }}</h3>
{{ toctree(includehidden=theme_sidebar_includehidden, collapse=theme_sidebar_collapse) }}
{{ toctree(
collapse=theme_sidebar_collapse,
maxdepth=theme_sidebar_maxdepth|int,
titles_only=theme_sidebar_titles_only,
includehidden=theme_sidebar_includehidden
) }}
{% if theme_extra_nav_links %}
<hr />
<ul>
Expand Down
2 changes: 2 additions & 0 deletions alabaster/theme.conf
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ show_relbar_bottom =
show_relbar_top =
show_relbars = false
sidebar_collapse = true
sidebar_maxdepth = 2
sidebar_titles_only = false
sidebar_includehidden = true
sidebar_width = 220px
tidelift_url =
Expand Down
13 changes: 9 additions & 4 deletions docs/customization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,15 @@ Sidebar-related options that aren't directly related to service links.
header/footer options; the two visual components are orthogonal and may be
enabled/disabled independently of one another.

* ``sidebar_collapse``: Boolean determining whether all TOC entries that
are not ancestors of the current page are collapsed.
You can read more about this in the Sphinx toctree
`docs <http://www.sphinx-doc.org/en/stable/templating.html#toctree>`_.
* ``sidebar_collapse``: Boolean determining whether all TOC entries that are not
ancestors of the current page are collapsed. You can read more about this
and the following settings in the Sphinx toctree
`docs <http://www.sphinx-doc.org/en/stable/templating.html#toctree>`_.
* ``sidebar_maxdepth``: Integer setting the maximum depth the sidebar will
expand to. This defaults to 2. You may set this to -1 to disable limiting
the depth.
* ``sidebar_titles_only``: Boolean determining whether the sidebar will show
only page titles or all page sections.
* ``sidebar_includehidden``: Boolean determining whether the TOC sidebar
should include hidden Sphinx toctree elements. Defaults to ``true`` so you
can use ``:hidden:`` in your index page's root toctree & avoid having 2x
Expand Down