{{define "title"}} {{.Query}} - Search {{end}} {{define "head"}} {{end}} {{define "query"}}{{.Query}}{{end}} {{define "content"}}

{{.Result.Total}} result{{if ne .Result.Total 1}}s{{end}} found for {{.Query}}

{{if .Result.DocumentResults}}
    {{range $dr := .Result.DocumentResults}}
  1. {{with $dr.Title}}{{highlight .}}{{else}}Untitled{{end}}

    {{highlight (replace (trimPrefix $dr.URL "/") "/" " › " -1)}} {{if $dr.SectionResults}}
      {{range $sr := $dr.SectionResults}}
    1. {{if $sr.ID}}

      {{range $i, $titleEntry := $sr.TitleStack}} {{if ge $i 2}} {{highlight $titleEntry}} {{if ne $i (subtract (len $sr.TitleStack) 1)}}›{{end}} {{end}} {{end}}

      {{end}} {{if $sr.Excerpts}} {{range (slice $sr.Excerpts 0 1)}}

      {{highlight .}}

      {{end}} {{end}}
    2. {{end}}
    {{end}}
  2. {{end}}
{{end}}
{{end}}