From 71dae159ca16d6ef86b28190756bfba3eec04eac Mon Sep 17 00:00:00 2001 From: Elias Olofsson <65086086+eliaserland@users.noreply.github.com> Date: Tue, 21 Jun 2022 15:08:26 +0200 Subject: [PATCH] :bug: Ensure trailing forward slash in baseURL during search index build. Hopefully fixes issue #223, where search functionality was broken from website deployed to netlify --- assets/js/search.js | 1 + 1 file changed, 1 insertion(+) diff --git a/assets/js/search.js b/assets/js/search.js index c15de8fe..49b4d8e7 100644 --- a/assets/js/search.js +++ b/assets/js/search.js @@ -107,6 +107,7 @@ function fetchJSON(path, callback) { function buildIndex() { var baseURL = wrapper.getAttribute("data-url"); + baseURL = baseURL.replace(/\/?$/, '/'); fetchJSON(baseURL + "index.json", function (data) { var options = { shouldSort: true,