Skip to content

Commit

Permalink
Add ability to override collapse in toctree variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
ericholscher committed Jun 21, 2016
1 parent 0f096c2 commit 59c85b1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion alabaster/navigation.html
@@ -1,5 +1,5 @@
<h3>{{ _('Navigation') }}</h3>
{{ toctree(includehidden=theme_sidebar_includehidden) }}
{{ toctree(includehidden=theme_sidebar_includehidden, collapse=theme_sidebar_collapse) }}
{% if theme_extra_nav_links %}
<hr />
<ul>
Expand Down
1 change: 1 addition & 0 deletions alabaster/theme.conf
Expand Up @@ -24,6 +24,7 @@ touch_icon =
canonical_url =
extra_nav_links =
sidebar_includehidden = true
sidebar_collapse = true
show_powered_by = true
show_related = false

Expand Down
4 changes: 4 additions & 0 deletions docs/customization.rst
Expand Up @@ -140,6 +140,10 @@ Variables and feature toggles
should include hidden Sphinx toctree elements. Defaults to ``true`` so you
can use ``:hidden:`` in your index page's root toctree & avoid having 2x
copies of your navigation on your landing page.
* ``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>`_.
* ``show_powered_by``: Boolean controlling display of the ``Powered by
Sphinx N.N.N. & Alabaster M.M.M`` section of the footer. When ``true``, is
displayed next to the copyright information; when ``false``, is hidden.
Expand Down

0 comments on commit 59c85b1

Please sign in to comment.