Merge pull request #2742 from notriddle/cache-fix-searchindex
Remove direct search index reference from searcher
This commit is contained in:
commit
4bf2b472bb
2 changed files with 4 additions and 1 deletions
|
|
@ -434,7 +434,7 @@ window.search = window.search || {};
|
|||
|
||||
function showSearch(yes) {
|
||||
if (yes) {
|
||||
loadSearchScript(path_to_root + '{{ resource "searchindex.js" }}', 'search-index');
|
||||
loadSearchScript(window.path_to_searchindex_js, 'search-index');
|
||||
search_wrap.classList.remove('hidden');
|
||||
searchicon.setAttribute('aria-expanded', 'true');
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -58,6 +58,9 @@
|
|||
const path_to_root = "{{ path_to_root }}";
|
||||
const default_light_theme = "{{ default_theme }}";
|
||||
const default_dark_theme = "{{ preferred_dark_theme }}";
|
||||
{{#if search_js}}
|
||||
window.path_to_searchindex_js = "{{ resource "searchindex.js" }}";
|
||||
{{/if}}
|
||||
</script>
|
||||
<!-- Start loading toc.js asap -->
|
||||
<script src="{{ resource "toc.js" }}"></script>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue