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 <miketheman@gmail.com>
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

Lines changed: 1 addition & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy