mirror of
https://github.com/readthedocs/sphinx_rtd_theme.git
synced 2025-02-25 18:55:21 -06: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:
@@ -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