From 16003b57a5cf1a502e52e0fa95ef72f32e01f3f5 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Mon, 27 Dec 2021 12:36:11 +0000 Subject: [PATCH] Use full path for search index If the search page is viewed without a trailing slash, it reads the wrong index file and lunr silently fails, resulting in no results being shown --- static/src/js/search.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/src/js/search.js b/static/src/js/search.js index bac97ac..775d6f4 100644 --- a/static/src/js/search.js +++ b/static/src/js/search.js @@ -79,7 +79,7 @@ $(document).ready(function() { const initialSearchTerm = getInitialSearchTerm(); searchInput.val(initialSearchTerm); - $.getJSON('./index.json', function(data) { + $.getJSON('/search/index.json', function(data) { // populate the index searchIndex = lunr(function() { this.ref('id');