summaryrefslogtreecommitdiff
path: root/sphinx/themes/basic/layout.html
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2021-01-23 20:44:13 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2021-01-23 20:44:13 +0900
commitccf4ae37298d9088fa7bc1ad8d311be203aa795c (patch)
tree90e9dbc0f5eb01dc3415719e737597f44c68ad4d /sphinx/themes/basic/layout.html
parent65a69965a1dba7e8f61caf53d3d8a9251eab4e19 (diff)
parent37fc43a4d389e173902207e753f4c9e28465e454 (diff)
downloadsphinx-git-ccf4ae37298d9088fa7bc1ad8d311be203aa795c.tar.gz
Merge branch 'master' into 8510_html_logo_url
Diffstat (limited to 'sphinx/themes/basic/layout.html')
-rw-r--r--sphinx/themes/basic/layout.html8
1 files changed, 3 insertions, 5 deletions
diff --git a/sphinx/themes/basic/layout.html b/sphinx/themes/basic/layout.html
index fd217b143..003e9e93a 100644
--- a/sphinx/themes/basic/layout.html
+++ b/sphinx/themes/basic/layout.html
@@ -4,7 +4,7 @@
Master layout template for Sphinx themes.
- :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
+ :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
#}
{%- block doctype -%}{%- if html5_doctype %}
@@ -18,7 +18,7 @@
{%- set render_sidebar = (not embedded) and (not theme_nosidebar|tobool) and
(sidebars != []) %}
{%- set url_root = pathto('', 1) %}
-{# XXX necessary? #}
+{# URL root should never be #, then all links are fragments #}
{%- if url_root == '#' %}{% set url_root = '' %}{% endif %}
{%- if not embedded and docstitle %}
{%- set titlesuffix = " &#8212; "|safe + docstitle|e %}
@@ -88,15 +88,13 @@
{%- endmacro %}
{%- macro script() %}
- <script id="documentation_options" data-url_root="{{ pathto('', 1) }}" src="{{ pathto('_static/documentation_options.js', 1) }}"></script>
+ <script id="documentation_options" data-url_root="{{ url_root }}" src="{{ pathto('_static/documentation_options.js', 1) }}"></script>
{%- for js in script_files %}
{{ js_tag(js) }}
{%- endfor %}
{%- endmacro %}
{%- macro css() %}
- <link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" />
- <link rel="stylesheet" href="{{ pathto('_static/' + style, 1)|e }}" type="text/css" />
{%- for css in css_files %}
{%- if css|attr("filename") %}
{{ css_tag(css) }}