diff --git a/layouts/_default/list.searchindex.json b/layouts/_default/list.searchindex.json index dab5254..3fabb70 100644 --- a/layouts/_default/list.searchindex.json +++ b/layouts/_default/list.searchindex.json @@ -1,3 +1,4 @@ +{{ .Scratch.Delete "searchindex" }} {{- $.Scratch.Add "searchindex" slice -}} {{ if eq .Type "publication" }} diff --git a/layouts/_default/single.searchindex.json b/layouts/_default/single.searchindex.json index 7c7b3c0..11e8280 100644 --- a/layouts/_default/single.searchindex.json +++ b/layouts/_default/single.searchindex.json @@ -1,3 +1,4 @@ +{{ .Scratch.Delete "searchindex" }} {{- $.Scratch.Add "searchindex" slice -}} {{- range $index, $element := (where .Site.RegularPages "Kind" "page") -}} {{ with $element.Plain }} diff --git a/layouts/_default/taxonomy.searchindex.json b/layouts/_default/taxonomy.searchindex.json index 7c7b3c0..11e8280 100644 --- a/layouts/_default/taxonomy.searchindex.json +++ b/layouts/_default/taxonomy.searchindex.json @@ -1,3 +1,4 @@ +{{ .Scratch.Delete "searchindex" }} {{- $.Scratch.Add "searchindex" slice -}} {{- range $index, $element := (where .Site.RegularPages "Kind" "page") -}} {{ with $element.Plain }} diff --git a/layouts/_default/terms.searchindex.json b/layouts/_default/terms.searchindex.json index 7c7b3c0..11e8280 100644 --- a/layouts/_default/terms.searchindex.json +++ b/layouts/_default/terms.searchindex.json @@ -1,3 +1,4 @@ +{{ .Scratch.Delete "searchindex" }} {{- $.Scratch.Add "searchindex" slice -}} {{- range $index, $element := (where .Site.RegularPages "Kind" "page") -}} {{ with $element.Plain }} diff --git a/layouts/index.json b/layouts/index.json index 28666a0..98a3da9 100644 --- a/layouts/index.json +++ b/layouts/index.json @@ -1,3 +1,4 @@ +{{ .Scratch.Delete "searchindex" }} {{- $.Scratch.Add "searchindex" slice -}} {{- range $index, $element := (where .Site.RegularPages "Kind" "page") -}} {{ with $element.Plain }} diff --git a/layouts/partials/head/scripts.html b/layouts/partials/head/scripts.html index c6fc9f0..3a5f403 100644 --- a/layouts/partials/head/scripts.html +++ b/layouts/partials/head/scripts.html @@ -857,7 +857,7 @@ searchText = e.target.value; var results = fuse.search(e.target.value); - + if (searchResultPosition === "main") { if (enableSearchHighlight) { renderSearchHighlightResultsMain(searchText, results);