{{- $items := slice -}} {{- range site.RegularPages -}} {{- $section := .CurrentSection.Title -}} {{- if and (eq .Section "platform") (ne .CurrentSection .FirstSection) -}} {{- $section = printf "%s ยท %s" .FirstSection.Title $section -}} {{- end -}} {{- $items = $items | append (dict "title" .Title "url" .RelPermalink "section" (cond (eq .Section "apps") (.Params.category | default "Applications") $section) "tagline" (.Params.tagline | default "") "replaces" (delimit (.Params.replaces | default slice) ", ") "headings" (delimit (findRE `(?m)^#{2,3} .+$` .RawContent) " " | replaceRE `#+ ` "") "body" (.Plain | truncate 1200) ) -}} {{- end -}} {{- $items | jsonify -}}