File tree Expand file tree Collapse file tree 2 files changed +7
-16
lines changed Expand file tree Collapse file tree 2 files changed +7
-16
lines changed Original file line number Diff line number Diff line change 155155 {%- block navigation %}
156156 < div class ="wy-menu wy-menu-vertical " data-spy ="affix " role ="navigation " aria-label ="{{ _('Main') }} ">
157157 {%- block menu %}
158- {#-
159- The singlehtml builder doesn't handle this toctree call when the
160- toctree is empty. Skip building this for now.
161- #}
162- {%- if 'singlehtml' not in builder %}
163- {%- set global_toc = toctree(maxdepth=theme_navigation_depth|int,
164- collapse=theme_collapse_navigation|tobool,
165- includehidden=theme_includehidden|tobool,
166- titles_only=theme_titles_only|tobool) %}
167- {%- endif %}
168- {%- if global_toc %}
169- {{ global_toc }}
158+ {%- set toctree = toctree(maxdepth=theme_navigation_depth|int,
159+ collapse=theme_collapse_navigation|tobool,
160+ includehidden=theme_includehidden|tobool,
161+ titles_only=theme_titles_only|tobool) %}
162+ {%- if toctree %}
163+ {{ toctree }}
170164 {%- else %}
171165 <!-- Local TOC -->
172166 < div class ="local-toc "> {{ toc }}</ div >
Original file line number Diff line number Diff line change @@ -30,12 +30,9 @@ def test_basic():
3030 assert search in content
3131 elif isinstance (app .builder , SingleFileHTMLBuilder ):
3232 search = (
33- '<div class="local-toc">< ul>\n '
33+ '<ul>\n '
3434 '<li class="toctree-l1">'
3535 '<a class="reference internal" href="index.html#document-foo">foo</a>'
36- '<ul>\n '
37- '<li class="toctree-l2">'
38- '<a class="reference internal" href="index.html#document-bar">bar</a>'
3936 '</li>\n '
4037 '</ul>'
4138 )
You can’t perform that action at this time.
0 commit comments