{{- if (gt (len .Ancestors.Reverse) 1) | and (eq .Site.Params.breadcrumb.enable true) -}}
  {{- $separator := .Site.Params.breadcrumb.separator | default "/" -}}
  <nav aria-label="breadcrumb" class="breadcrumb-container{{ if .Site.Params.breadcrumb.sticky }} sticky{{ end }}">
    <ol class="breadcrumb">
      {{- range .Ancestors.Reverse -}}
        {{- if .IsHome | and (not .Site.Params.breadcrumb.showHome) -}}
          {{- continue -}}
        {{- end -}}

        {{- $title := "" -}}
        {{- $capitalizeTitles := .Param "capitalizeTitles" -}}
        {{- with .Description -}}
          {{- $title = . -}}
        {{- else -}}
          {{- $title = cond $capitalizeTitles (title .LinkTitle) .LinkTitle -}}
          {{- if .IsPage | and .Summary -}}
            {{- $title = .Summary | plainify -}}
          {{- end -}}
        {{- end -}}

        {{- $innerText := "" -}}
        {{- if .IsHome -}}
          {{- $innerText = T "single.home" -}}
        {{- else -}}
          {{- $innerText = .Page.Params.shortTitle | default (lower .LinkTitle | T) | default .LinkTitle -}}
          {{- $innerText = cond ((.Param "breadcrumb.capitalize") | and $capitalizeTitles) (title $innerText) $innerText -}}
        {{- end -}}

        <li class="breadcrumb-item" data-separator="{{ $separator }}"><a href="{{ .RelPermalink }}" title="{{ $title }}">{{ $innerText }}</a></li>
      {{- end -}}

      {{- $currentText := .Page.Params.shortTitle | default (lower .LinkTitle | T) | default .LinkTitle -}}
      {{- $currentText = cond ((.Param "breadcrumb.capitalize") | and (.Param "capitalizeTitles")) (title $currentText) $currentText -}}
      <li class="breadcrumb-item active" data-separator="{{ $separator }}" aria-current="page">{{ $currentText }}</li>
    </ol>
  </nav>
{{- end -}}
