{{ $url := .Permalink | relURL }}
<nav class="breadcrumb small mb-5" aria-label="breadcrumb">
  <!-- <a href="/{{ $.Site.Params.docs_version }}/" class="cd-breadcrumb-item">Home</a></li> -->
  {{ $breadcrumbs := split ((replace $url (printf "%s/" $.Site.Params.docs_version) "") | replaceRE "^/(.*)/$" "$1" ) "/" }}
  {{ range $index, $element := last 5 $breadcrumbs }}
    {{ $.Scratch.Add "path" . }}
    {{ $len := len (last 5 $breadcrumbs) }}
    {{ if eq $index (sub $len 1) }}
    <span class="breadcrumb-item active">{{ humanize (replace . "-" " ") }}</span>
    {{ else }}
      <a href='/{{ $.Scratch.Get "path" }}' class="breadcrumb-item">{{ humanize (replace . "-" " ") }}</a>
    {{ end }}
    {{ $.Scratch.Add "path" "/" }}
  {{ end }}
  <!-- <span class="breadcrumb-date ms-auto text-disabled-dark">Last updated: {{ .Page.Lastmod.Format "January 2, 2006" }}</span> -->
</nav>
