mirror of
https://github.com/readthedocs/sphinx_rtd_theme.git
synced 2026-10-12 09:24:51 -05:00
Set data-content_root for Sphinx ≥ 7.2 (#1507)
This attribute is now required by searchtools.js: https://github.com/sphinx-doc/sphinx/blob/v7.2.2/sphinx/themes/basic/static/searchtools.js#L65 When it's not set, loading search results via AJAX will be broken because the JS code will attempt to load paths like /undefinedfoo.html. Co-authored-by: Manuel Kaufmann <humitos@gmail.com>
This commit is contained in:
1 parent
41aca736bc
commit
4874e9428d
1 file changed
+1
-1
@@ -14,7 +14,7 @@
|
||||
{%- set sphinx_version_info = (_ver_major, _ver_minor, -1) -%}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html class="{{ sphinx_writer }}" lang="{{ lang_attr }}" >
|
||||
<html class="{{ sphinx_writer }}" lang="{{ lang_attr }}"{% if sphinx_version_info >= (7, 2) %} data-content_root="{{ content_root }}"{% endif %}>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
{{- metatags }}
|
||||
|
||||
Reference in new issue
Block a user