From fad80051e5017931cd74c408eb767f6bcab8edee Mon Sep 17 00:00:00 2001 From: Rahat Zaman Date: Tue, 30 Jun 2020 16:21:14 +0600 Subject: [PATCH] Fixed index.json not found error index.json was 404 because it was actually in language folder. But was searching in root. --- layouts/partials/head/scripts.html | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/layouts/partials/head/scripts.html b/layouts/partials/head/scripts.html index 947d459..72326a8 100644 --- a/layouts/partials/head/scripts.html +++ b/layouts/partials/head/scripts.html @@ -553,8 +553,6 @@ // ========================== search ========================== - {{ $baseurl:= $.Site.BaseURL }} - var baseurl = JSON.parse({{ $baseurl | jsonify }}); {{ $permalink:= .Permalink }} var permalink = JSON.parse({{ $permalink | jsonify }}); var searchResults = null; @@ -575,7 +573,7 @@ if (enableSearch) { (function initFuse() { var xhr = new XMLHttpRequest(); - xhr.open('GET', baseurl + "/index.json"); + xhr.open('GET', "/{{ .Lang }}/index.json"); xhr.setRequestHeader('Content-Type', 'application/json; charset=utf-8'); xhr.onload = function () { if (xhr.status === 200) {