Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zzossig/hugo-theme-zdoc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/head/scripts.html')
-rw-r--r--layouts/partials/head/scripts.html8
1 files changed, 4 insertions, 4 deletions
diff --git a/layouts/partials/head/scripts.html b/layouts/partials/head/scripts.html
index c2b2f9c..6fa78c1 100644
--- a/layouts/partials/head/scripts.html
+++ b/layouts/partials/head/scripts.html
@@ -452,12 +452,12 @@
}
});
}) : null;
- // ============================================================
+ // ============================================================
// ========================== search ==========================
- {{ $permalink:= .Permalink }}
- var permalink = JSON.parse({{ $permalink | jsonify }});
+ {{ $searchURL:= ("/" | absLangURL) }}
+ var searchURL = JSON.parse({{ $searchURL | jsonify }});
var searchResults = null;
var searchMenu = null;
var searchText = null;
@@ -472,7 +472,7 @@
if (enableSearch) {
(function initFuse() {
var xhr = new XMLHttpRequest();
- xhr.open('GET', permalink + "index.json");
+ xhr.open('GET', searchURL + "index.json");
xhr.setRequestHeader('Content-Type', 'application/json; charset=utf-8');
xhr.onload = function () {
if (xhr.status === 200) {