feat(search): improve search index
This commit is contained in:
@@ -18,7 +18,7 @@
|
|||||||
{{- if gt $i 0 -}}
|
{{- if gt $i 0 -}}
|
||||||
{{- $chunked = printf "<h2 id=%s" $chunked -}}
|
{{- $chunked = printf "<h2 id=%s" $chunked -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- $chunked = $chunked | plainify | htmlUnescape | replaceRE `[\n ]+` ` ` -}}
|
{{- $chunked = $chunked | plainify | htmlUnescape | replace "\n" " " | replace "\t" " " | replaceRE " +" " " -}}
|
||||||
{{- if gt $.Site.Params.search.contentLength 0 -}}
|
{{- if gt $.Site.Params.search.contentLength 0 -}}
|
||||||
{{- $chunked = substr $chunked 0 $.Site.Params.search.contentLength -}}
|
{{- $chunked = substr $chunked 0 $.Site.Params.search.contentLength -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|||||||
Reference in New Issue
Block a user