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

index.json « layouts - github.com/zzossig/hugo-theme-zdoc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0a960383ae046575468651a5aaa937d4a9f93ba1 (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 -}}