Welcome to mirror list, hosted at ThFree Co, Russian Federation.

list.searchindex.json « _default « layouts - github.com/zzossig/hugo-theme-zdoc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b29edc3a0399a2e90360ed0cd77b72d8e395716c (plain)
1
2
3
4
5
6
7
{{- $.Scratch.Add "searchindex" slice -}}
{{- range $index, $element := (where .Site.Pages "Kind" "page") -}}
  {{ with $element.Plain }}
    {{- $.Scratch.Add "searchindex" (dict "id" $index "title" $element.Title "uri" $element.Permalink "tags" $element.Params.tags "section" $element.Section "content" $element.Plain "description" $element.Description) -}}
  {{ end }}
{{- end -}}
{{- $.Scratch.Get "searchindex" | jsonify -}}