fix(flexsearch): separate chain of calls into statements
This commit is contained in:
parent
7c834a5a11
commit
10f8c8ea00
|
@ -97,8 +97,8 @@ Source:
|
||||||
{{ $list := (where .Site.Pages "Section" "docs") -}}
|
{{ $list := (where .Site.Pages "Section" "docs") -}}
|
||||||
{{ $len := (len $list) -}}
|
{{ $len := (len $list) -}}
|
||||||
|
|
||||||
index.add(
|
{{ range $index, $element := $list -}}
|
||||||
{{ range $index, $element := $list -}}
|
index.add(
|
||||||
{
|
{
|
||||||
id: {{ $index }},
|
id: {{ $index }},
|
||||||
href: "{{ .RelPermalink }}",
|
href: "{{ .RelPermalink }}",
|
||||||
|
@ -109,12 +109,9 @@ Source:
|
||||||
description: {{ .Summary | plainify | jsonify }},
|
description: {{ .Summary | plainify | jsonify }},
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
content: {{ .Plain | jsonify }}
|
content: {{ .Plain | jsonify }}
|
||||||
})
|
}
|
||||||
{{ if ne (add $index 1) $len -}}
|
);
|
||||||
.add(
|
{{ end -}}
|
||||||
{{ end -}}
|
|
||||||
{{ end -}}
|
|
||||||
;
|
|
||||||
|
|
||||||
search.addEventListener('input', show_results, true);
|
search.addEventListener('input', show_results, true);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue