@@ -111,7 +111,7 @@
@@ -280,26 +280,26 @@
{{/if}}
{{#if playground_js}}
-
-
-
-
-
+
+
+
+
+
{{/if}}
{{#if search_js}}
-
-
-
+
+
+
{{/if}}
-
-
-
+
+
+
{{#each additional_js}}
-
+
{{/each}}
{{#if is_print}}
diff --git a/src/theme/searcher/searcher.js b/src/theme/searcher/searcher.js
index dc03e0a0..a275f48e 100644
--- a/src/theme/searcher/searcher.js
+++ b/src/theme/searcher/searcher.js
@@ -468,12 +468,12 @@ window.search = window.search || {};
showResults(true);
}
- fetch(path_to_root + 'searchindex.json')
+ fetch('{{ resource "searchindex.json" }}')
.then(response => response.json())
.then(json => init(json))
.catch(error => { // Try to load searchindex.js if fetch failed
var script = document.createElement('script');
- script.src = path_to_root + 'searchindex.js';
+ script.src = '{{ resource "searchindex.js" }}';
script.onload = () => init(window.search);
document.head.appendChild(script);
});