{{ define "main" }} {{ partial "primary-top.html" . }} {{ .Content }}
{{ $words := .Resources.ByType "page" }}
{{ $scratch := .Scratch }} {{ $scratch.Set "previous" "-" }} {{ range $w := $words }} {{ $first := (upper (slicestr $w.Title 0 1)) }} {{ $previous := ($scratch.Get "previous") }} {{ if ne $first $previous }} {{ if ne $previous "-" }} | {{ end }} {{ $first }} {{ $scratch.Set "previous" $first }} {{ end }} {{ end }}
{{ $scratch.Set "previous" "-" }} {{ range $w := $words }} {{ $first := (upper (slicestr $w.Title 0 1)) }} {{ $previous := ($scratch.Get "previous") }} {{ if ne $first $previous }} {{ if ne $previous "-" }} {{ end }}

{{ $first }}

{{ $scratch.Set "previous" $first }} {{ end }} {{ $name := $w.Title | urlize }}
{{ $w.Title }}
{{ $w.Content }}
{{ end }}
{{ partial "primary-bottom.html" . }} {{ end }}