{ result :[ {{- range where .Site.Pages "Section" "docs" -}} {{ $titles := findRE "(.|\n)*?" .Content -}} {{ $plain := apply $titles "plainify" "." -}} {{ $cleaned := $plain | complement (slice "constructor" "Signature" "Members") -}} {{ $quoted := apply $cleaned "replaceRE" ".*" "'$0'" "." -}} {{ $section := cond (in .Dir "configuration") "config" (cond (in .Dir "graphql-api") "gql" "guides") }} { section: '{{ $section }}', parent: '{{ title .Parent.Title }}', title: '{{ .Title }}', headings: [{{ delimit $quoted ", " }}], url: '{{ .RelPermalink }}' }, {{- end }} ] }