Add theme option for collapsing the nav.

This defaults to on,
because many use cases don't have large navs and want to see them all.
However,
it can be a large speedup for large docsets
This commit is contained in:
Eric Holscher 2015-06-21 21:40:40 -04:00
parent 9779e08157
commit ae6c09b352
2 changed files with 2 additions and 1 deletions

View File

@ -107,7 +107,7 @@
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation"> <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
{% block menu %} {% block menu %}
{% set toctree = toctree(maxdepth=4, collapse=False, includehidden=True) %} {% set toctree = toctree(maxdepth=4, collapse=theme_collapse_navigation, includehidden=True) %}
{% if toctree %} {% if toctree %}
{{ toctree }} {{ toctree }}
{% else %} {% else %}

View File

@ -7,3 +7,4 @@ typekit_id = hiw1hhg
analytics_id = analytics_id =
sticky_navigation = False sticky_navigation = False
logo_only = logo_only =
collapse_navigation = True