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 1/2] :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, From fbcf957d98e84a33b5a1f37bb5365c8a76bbfbba Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Wed, 22 Jun 2022 11:50:52 +1000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=93=9D=20Update=20changelog?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b9c86f84..28f4f74e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] +### Fixed + +- Search not working when `baseURL` does not end with a forward slash ([#224](https://github.com/jpanther/congo/pull/224)) + ## [2.2.2] - 2022-06-16 ### Added