diff options
author | zzossig <zzossig@gmail.com> | 2020-03-10 03:49:30 +0300 |
---|---|---|
committer | zzossig <zzossig@gmail.com> | 2020-03-10 03:49:30 +0300 |
commit | 8cdd6df08e300fa1116ae18f57512fb11d90ae49 (patch) | |
tree | 091d438d85482207f82baa0c956838e6f179a5ad | |
parent | b640731190a9e0c7b64f9c77efd8d41be980bdce (diff) |
make less search indexes
-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) { |