index.json 340 B

123456
  1. {{- $.Scratch.Add "index" slice -}}
  2. {{ $posts := (where (.Site.RegularPages) "Type" "in" .Site.Params.searchTypes) }}
  3. {{- range $posts -}}
  4. {{- $.Scratch.Add "index" (dict "title" .Title "tags" .Params.tags "categories" .Params.categories "contents" .Plain "permalink" .Permalink) -}}
  5. {{- end -}}
  6. {{- $.Scratch.Get "index" | jsonify -}}