diff options
-rw-r--r-- | exampleSite/config/_default/config.toml | 3 | ||||
-rw-r--r-- | layouts/partials/head/scripts.html | 8 |
2 files changed, 4 insertions, 7 deletions
diff --git a/exampleSite/config/_default/config.toml b/exampleSite/config/_default/config.toml index a34be73..3a3fc6d 100644 --- a/exampleSite/config/_default/config.toml +++ b/exampleSite/config/_default/config.toml @@ -33,10 +33,7 @@ disableKinds = ["taxonomyTerm"] startLevel = 2 [outputs] - page = ["HTML", "SearchIndex"] home = ["HTML", "RSS", "SearchIndex"] - section = ["HTML", "RSS", "SearchIndex"] - taxonomy = ["HTML", "RSS", "SearchIndex"] [outputFormats] [outputFormats.SearchIndex] diff --git a/layouts/partials/head/scripts.html b/layouts/partials/head/scripts.html index c2b2f9c..6fa78c1 100644 --- a/layouts/partials/head/scripts.html +++ b/layouts/partials/head/scripts.html @@ -452,12 +452,12 @@ } }); }) : null; - // ============================================================ + // ============================================================ // ========================== search ========================== - {{ $permalink:= .Permalink }} - var permalink = JSON.parse({{ $permalink | jsonify }}); + {{ $searchURL:= ("/" | absLangURL) }} + var searchURL = JSON.parse({{ $searchURL | jsonify }}); var searchResults = null; var searchMenu = null; var searchText = null; @@ -472,7 +472,7 @@ if (enableSearch) { (function initFuse() { var xhr = new XMLHttpRequest(); - xhr.open('GET', permalink + "index.json"); + xhr.open('GET', searchURL + "index.json"); xhr.setRequestHeader('Content-Type', 'application/json; charset=utf-8'); xhr.onload = function () { if (xhr.status === 200) { |