Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.

Commit 85242c9

Browse files
committed
Move search doc page context additions
This relies on readthedocs/readthedocs.org#1808 and readthedocs/readthedocs.org#1866
1 parent c63291e commit 85242c9

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

readthedocs_ext/_static/readthedocs-data.js_t

+12-3
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,26 @@
22
project: "{{ slug }}",
33
version: "{{ current_version }}",
44
language: "{{ rtd_language }}",
5+
subprojects: {},
6+
canonical_url: "{{ canonical_url }}",
57
page: "{{ pagename }}",
68
theme: "{{ html_theme }}",
79
builder: "sphinx",
810
docroot: "{{ conf_py_path }}",
11+
{% if page_source_suffic %}
12+
source_suffix: "{{ page_source_suffix }}",
13+
{% else %}
914
source_suffix: "{{ source_suffix }}",
15+
{% endif %}
1016
api_host: "{{ api_host }}",
1117
commit: "{{ commit }}"
12-
}
13-
18+
};
19+
{% for slug, url in subprojects %}
20+
READTHEDOCS_DATA.subprojects["{{ slug }}"] = "{{ url }}";
21+
{% endfor %}
22+
1423
// Old variables
1524
var doc_version = "{{ current_version }}";
1625
var doc_slug = "{{ slug }}";
1726
var page_name = "{{ pagename }}";
18-
var html_theme = "{{ html_theme }}";
27+
var html_theme = "{{ html_theme }}";

0 commit comments

Comments
 (0)