searchindex.html 651 B

12345678910111213
  1. {
  2. result :[
  3. {{- range where .Site.Pages "Section" "docs" -}}
  4. {{ $titles := findRE "<h(1|2).*?>(.|\n)*?</h(1|2)>" .Content -}}
  5. {{ $plain := apply $titles "plainify" "." -}}
  6. {{ $cleaned := $plain | complement (slice "constructor" "Signature" "Members") -}}
  7. {{ $quoted := apply $cleaned "replaceRE" ".*" "'$0'" "." -}}
  8. {{ $section := cond (in .Dir "configuration") "config" (cond (in .Dir "graphql-api") "gql" "guides") }}
  9. { section: '{{ $section }}', parent: '{{ title .Parent.Title }}', title: '{{ .Title }}', headings: [{{ delimit $quoted ", " }}], url: '{{ .RelPermalink }}' },
  10. {{- end }}
  11. ]
  12. }