Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 788fee7

Browse files
committed
fix: override correct tag
When the template was made responsive, the choice was made to override the `body_tag` fragment. The `body_tag` block is a literal `<body>` which allows the theme developer to set properties on the `body` tag. See: sphinx-doc/sphinx#4140 Instead, use the `document` block as documented. https://www.sphinx-doc.org/en/master/development/templating.html#blocks Overriding the correct block places the `mobile-nav` section _after_ the majority of the other HTML parts, which enables the correct function of the `/` keyboard shortcut. Resolves #130 Closes #131 Closes #135 Signed-off-by: Mike Fiedler <[email protected]>
1 parent 44e62dd commit 788fee7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python_docs_theme/layout.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ <h3>{{ _('Navigation') }}</h3>
8282
{{ super() }}
8383
{%- endblock -%}
8484

85-
{%- block body_tag %}
85+
{%- block document %}
8686
{{ super() }}
8787
{%- if builder != 'htmlhelp' %}
8888
<div class="mobile-nav">

0 commit comments

Comments
 (0)