Skip to content

Commit 2eb9415

Browse files
authored
Merge pull request #489 from rtfd/includehidden_option
Fix #485 Add Includehidden theme option
2 parents 9d704f2 + 052b395 commit 2eb9415

File tree

3 files changed

+20
-11
lines changed

3 files changed

+20
-11
lines changed

README.rst

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,16 +87,26 @@ file of this repository, and can be defined in your project's ``conf.py`` via
8787
.. code:: python
8888
8989
html_theme_options = {
90-
'collapse_navigation': False,
91-
'display_version': False,
92-
'navigation_depth': 3,
90+
'typekit_id': hiw1hhg,
91+
'canonical_url':
92+
'analytics_id':
93+
'collapse_navigation': False
94+
'sticky_navigation': False
95+
'navigation_depth': 4
96+
'includehidden': True
97+
'logo_only':
98+
'display_version': True
99+
'prev_next_buttons_location': bottom
93100
}
94101
95102
The following options are available:
96103

97104
* ``canonical_url`` This will specify a `canonical url <https://en.wikipedia.org/wiki/Canonical_link_element>`__
98105
to let search engines know they should give higher ranking to latest version of the docs.
99106
The url points to the root of the documentation and requires a trailing slash.
107+
* ``includehidden`` Specifies if the global toctree includes toctrees marked with the `:hidden:` option
108+
* ``prev_next_buttons_location`` can take the value ``bottom``, ``top``, ``both`` , or ``None``
109+
and will display the "Next" and "Previous" buttons accordingly
100110

101111
Page-level configuration
102112
------------------------
@@ -168,9 +178,7 @@ v0.1.10-alpha
168178
* Removes Sphinx dependency
169179
* Fixes hamburger on mobile display
170180
* Adds a ``body_begin`` block to the template
171-
* Add ``prev_next_buttons_location`` which can take the value ``bottom``,
172-
``top``, ``both`` , ``None`` and will display the "Next" and "Previous"
173-
buttons accordingly
181+
* Added ``prev_next_buttons_location``
174182

175183
v0.1.9
176184
------
@@ -209,7 +217,7 @@ It's important to note that if you don't follow the same styling for your rST he
209217
your documents, the toctree will misbuild, and the resulting menu might not show the correct
210218
depth when it renders.
211219

212-
Also note that the table of contents is set with ``includehidden=true``. This allows you
220+
Also note that by default the table of contents is set with ``includehidden=True``. This allows you
213221
to set a hidden toc in your index file with the hidden_ property that will allow you
214222
to build a toc without it rendering in your index.
215223

sphinx_rtd_theme/layout.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131
toctree is empty. Skip building this for now.
132132
#}
133133
{% if 'singlehtml' not in builder %}
134-
{% set global_toc = toctree(maxdepth=theme_navigation_depth|int, collapse=theme_collapse_navigation, includehidden=True) %}
134+
{% set global_toc = toctree(maxdepth=theme_navigation_depth|int, collapse=theme_collapse_navigation, includehidden=theme_includehidden) %}
135135
{% endif %}
136136
{% if global_toc %}
137137
{{ global_toc }}

sphinx_rtd_theme/theme.conf

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@ stylesheet = css/theme.css
44

55
[options]
66
typekit_id = hiw1hhg
7+
canonical_url =
78
analytics_id =
9+
collapse_navigation = False
810
sticky_navigation = False
11+
navigation_depth = 4
12+
includehidden = True
913
logo_only =
10-
collapse_navigation = False
1114
display_version = True
12-
navigation_depth = 4
1315
prev_next_buttons_location = bottom
14-
canonical_url =

0 commit comments

Comments
 (0)