Skip to content

Commit

Permalink
GH-882 Fix search for websites using subpaths in baseURL
Browse files Browse the repository at this point in the history
Fixes #882

Signed-off-by: Olaf Lessenich <[email protected]>
  • Loading branch information
xai committed Sep 23, 2022
1 parent 7fcac1f commit 624acab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion assets/js/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class SynaSearch {
return callback(this.indexCache);
}

$.ajax({ method: 'get', url: '/index.json' }).then((data) => {
$.ajax({ method: 'get', url: (window.location.origin + window.location.pathname).replace(/[\/]search[\/]$/, '') + 'index.json' }).then((data) => {
this.indexCache = data;
callback(data);
});
Expand Down
2 changes: 1 addition & 1 deletion assets/scripts/syna-search.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 624acab

Please sign in to comment.