{{ $documentation := site.GetPage "/documentation" }} {{ $currentSection := .CurrentSection }} {{ $ancestors := .Ancestors.Reverse }} {{ range $i, $p := $ancestors }} {{ $isCurrentSection := eq $p $currentSection }} {{/* We currently have a slightly odd structure. */}} {{ if eq $p site.Home }} {{ $p = $documentation }} {{ end }} {{ $isLast := eq $i (sub (len $ancestors) 1) }} {{ $p.LinkTitle }} {{ if ne $ $documentation }} {{ template "breadcrumbs-arrow" . }} {{ end }} {{ end }} {{ if ne $ $documentation }} {{ $isCurrentSection := eq $ $currentSection }} {{ $.LinkTitle }} {{ end }} {{ define "breadcrumbs-arrow" }} {{ end }}