From cbdf3e42b1d7356115b2fdb4daf0d250126052b8 Mon Sep 17 00:00:00 2001 From: Geo Date: Fri, 15 Sep 2023 16:08:39 +0100 Subject: [PATCH] feat: support Hugo's change in behaviour of relURL/relLangURL Hugo team changed behaviour of relURL/relLangURL, requiring removal of slash prefix to path Fix built-in search results are empty when deploying site to domain's sub-folder Fix #2985 --- modules/wowchemy/layouts/partials/site_js.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/wowchemy/layouts/partials/site_js.html b/modules/wowchemy/layouts/partials/site_js.html index 3885f6628..d0db70159 100644 --- a/modules/wowchemy/layouts/partials/site_js.html +++ b/modules/wowchemy/layouts/partials/site_js.html @@ -112,7 +112,7 @@ {{/* Configure search engine. */}} {{ $min_length := site.Params.features.search.wowchemy.min_length | default 1 }} {{ $threshold := site.Params.features.search.wowchemy.threshold | default 0.3 }} - {{ $search_config := dict "indexURI" ("/index.json" | relLangURL) "threshold" $threshold "minLength" $min_length }} + {{ $search_config := dict "indexURI" ("index.json" | relLangURL) "threshold" $threshold "minLength" $min_length }} {{ $search_i18n := dict "placeholder" (i18n "search_placeholder") "results" (i18n "search_results") "no_results" (i18n "search_no_results") }} {{ $content_types := dict "post" (i18n "posts") "project" (i18n "projects") "publication" (i18n "publications") "event" (i18n "talks") "slides" (i18n "slides") "authors" (i18n "authors") }} {{ $js_search_params = dict "search_config" $search_config "algoliaConfig" $algoliaConfig "i18n" $search_i18n "content_type" $content_types }}