Init search index before make it
This commit is contained in:
parent
2cf3ecf406
commit
b17da60cb1
|
@ -1,3 +1,4 @@
|
||||||
|
{{ .Scratch.Delete "searchindex" }}
|
||||||
{{- $.Scratch.Add "searchindex" slice -}}
|
{{- $.Scratch.Add "searchindex" slice -}}
|
||||||
|
|
||||||
{{ if eq .Type "publication" }}
|
{{ if eq .Type "publication" }}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{{ .Scratch.Delete "searchindex" }}
|
||||||
{{- $.Scratch.Add "searchindex" slice -}}
|
{{- $.Scratch.Add "searchindex" slice -}}
|
||||||
{{- range $index, $element := (where .Site.RegularPages "Kind" "page") -}}
|
{{- range $index, $element := (where .Site.RegularPages "Kind" "page") -}}
|
||||||
{{ with $element.Plain }}
|
{{ with $element.Plain }}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{{ .Scratch.Delete "searchindex" }}
|
||||||
{{- $.Scratch.Add "searchindex" slice -}}
|
{{- $.Scratch.Add "searchindex" slice -}}
|
||||||
{{- range $index, $element := (where .Site.RegularPages "Kind" "page") -}}
|
{{- range $index, $element := (where .Site.RegularPages "Kind" "page") -}}
|
||||||
{{ with $element.Plain }}
|
{{ with $element.Plain }}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{{ .Scratch.Delete "searchindex" }}
|
||||||
{{- $.Scratch.Add "searchindex" slice -}}
|
{{- $.Scratch.Add "searchindex" slice -}}
|
||||||
{{- range $index, $element := (where .Site.RegularPages "Kind" "page") -}}
|
{{- range $index, $element := (where .Site.RegularPages "Kind" "page") -}}
|
||||||
{{ with $element.Plain }}
|
{{ with $element.Plain }}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{{ .Scratch.Delete "searchindex" }}
|
||||||
{{- $.Scratch.Add "searchindex" slice -}}
|
{{- $.Scratch.Add "searchindex" slice -}}
|
||||||
{{- range $index, $element := (where .Site.RegularPages "Kind" "page") -}}
|
{{- range $index, $element := (where .Site.RegularPages "Kind" "page") -}}
|
||||||
{{ with $element.Plain }}
|
{{ with $element.Plain }}
|
||||||
|
|
|
@ -857,7 +857,7 @@
|
||||||
|
|
||||||
searchText = e.target.value;
|
searchText = e.target.value;
|
||||||
var results = fuse.search(e.target.value);
|
var results = fuse.search(e.target.value);
|
||||||
|
|
||||||
if (searchResultPosition === "main") {
|
if (searchResultPosition === "main") {
|
||||||
if (enableSearchHighlight) {
|
if (enableSearchHighlight) {
|
||||||
renderSearchHighlightResultsMain(searchText, results);
|
renderSearchHighlightResultsMain(searchText, results);
|
||||||
|
|
Loading…
Reference in New Issue