docs: Exclude files from TOC warnings and navigation sidebar.

Sphinx was displaying "WARNING: document isn't included in any toctree"
for files we just don't want in the TOC. We can hide them from the index,
but the rtd theme defaults to display hidden index entries in the nav bar.

This commit excludes these files from such warnings, and patches layout.html
so that hidden index entries stay hidden from the navigation sidebar.

This commit also moves password-strength.md under docs/production and
adds it as a hidden entry in production/index.rst.

Fixes #7417.
This commit is contained in:
David Rosa Tamsen
2017-11-21 11:38:06 -06:00
committed by Tim Abbott
parent 11b8b8f483
commit 84384196f2
5 changed files with 15 additions and 2 deletions

View File

@@ -131,7 +131,7 @@
toctree is empty. Skip building this for now.
#}
{% if 'singlehtml' not in builder %}
{% set global_toc = toctree(maxdepth=theme_navigation_depth|int, collapse=theme_collapse_navigation, includehidden=True) %}
{% set global_toc = toctree(maxdepth=theme_navigation_depth|int, collapse=theme_collapse_navigation, includehidden=False) %}
{% endif %}
{% if global_toc %}
{{ global_toc }}