Skip to content

Commit 4ffb008

Browse files
committed
build search index
1 parent 641a7d6 commit 4ffb008

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{{- $.Scratch.Add "searchindex" slice -}}
2+
{{- range $index, $element := .Site.Pages -}}
3+
{{- $.Scratch.Add "searchindex" (dict "id" $index "title" $element.Title "path" $element.RelPermalink "content" $element.Plain) -}}
4+
{{- end -}}
5+
{{- $.Scratch.Get "searchindex" | jsonify -}}

0 commit comments

Comments
 (0)