We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 041ca2d commit f082ca1Copy full SHA for f082ca1
readthedocs/doc_builder/templates/doc_builder/data.js.tmpl
@@ -6,8 +6,9 @@ var doc_slug = "{{ slug }}";
6
var page_name = "{{ pagename }}";
7
var html_theme = "{{ html_theme }}";
8
9
-// mkdocs_page_input_path isn't available on all pages (e.g. search result)
10
-if (mkdocs_page_input_path) {
+// mkdocs_page_input_path is only defined on the RTD mkdocs theme but it isn't
+// available on all pages (e.g. missing in search result)
11
+if (typeof mkdocs_page_input_path !== "undefined") {
12
READTHEDOCS_DATA["page"] = mkdocs_page_input_path.substr(
13
0, mkdocs_page_input_path.lastIndexOf(READTHEDOCS_DATA.source_suffix));
14
}
0 commit comments