<nav class="path-nav" aria-label="Breadcrumb">
  <ol>
    {{ template "breadcrumbnav" (dict "p1" . "p2" .) }}
  </ol>
</nav>

{{ define "breadcrumbnav" }}
  {{ if .p1.Parent }}
    {{ template "breadcrumbnav" (dict "p1" .p1.Parent "p2" .p2 ) }}
  {{ else if not .p1.IsHome }}
    {{ template "breadcrumbnav" (dict "p1" .p1.Site.Home "p2" .p2 ) }}
  {{ end }}
  <li{{ if eq .p1 .p2 }} class="current"{{ end }}>
    {{ if .p1.IsHome }}/{{ end }}
    <a href="{{ .p1.RelPermalink }}">{{ if .p1.IsHome }}{{ .p1.Site.Title }}{{ else }}{{ .p1.Title }}{{ end }}</a>
    {{ if ne .p1 .p2 }}/{{ end }}
  </li>
{{ end }}

