From d9dbba49ea960785ba25c085fd5a4469832566b0 Mon Sep 17 00:00:00 2001 From: Matt Ickstadt Date: Mon, 23 Jul 2018 12:19:59 -0500 Subject: [PATCH] Fix for relative paths --- src/theme/searcher/searcher.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/theme/searcher/searcher.js b/src/theme/searcher/searcher.js index 82041c66..7fd97d48 100644 --- a/src/theme/searcher/searcher.js +++ b/src/theme/searcher/searcher.js @@ -462,12 +462,12 @@ window.search = window.search || {}; showResults(true); } - fetch('searchindex.json') + fetch(path_to_root + 'searchindex.json') .then(response => response.json()) .then(json => init(json)) .catch(error => { // Try to load searchindex.js if fetch failed var script = document.createElement('script'); - script.src = 'searchindex.js'; + script.src = path_to_root + 'searchindex.js'; script.onload = () => init(window.search); document.head.appendChild(script); });