Fixing Search Issue
This commit is contained in:
parent
e70d29f5ed
commit
47fcddf092
@ -48,7 +48,7 @@ window.onload = function () {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
xhr.open('GET', "../index.json");
|
xhr.open('GET', jsonLangUrl); // Using Relative Path to Base URL instead of to current directory
|
||||||
xhr.send();
|
xhr.send();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,6 +21,10 @@
|
|||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div id="searchbox">
|
<div id="searchbox">
|
||||||
|
<!--Create Relative Link for Multilingual Search to avoid invalid URL problem-->
|
||||||
|
<script>
|
||||||
|
var jsonLangUrl = {{"/index.json" | relLangURL}};
|
||||||
|
</script>
|
||||||
<input id="searchInput" autofocus placeholder="{{ .Params.placeholder | default (printf "%s ↵" .Title) }}"
|
<input id="searchInput" autofocus placeholder="{{ .Params.placeholder | default (printf "%s ↵" .Title) }}"
|
||||||
aria-label="search" type="search" autocomplete="off">
|
aria-label="search" type="search" autocomplete="off">
|
||||||
<ul id="searchResults" aria-label="search results"></ul>
|
<ul id="searchResults" aria-label="search results"></ul>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user