diff --git a/layouts/partials/breadcrumb.html b/layouts/partials/breadcrumb.html index 9788217b..effea757 100644 --- a/layouts/partials/breadcrumb.html +++ b/layouts/partials/breadcrumb.html @@ -2,11 +2,31 @@ {{- range .Ancestors.Reverse -}} - {{- if or .Site.Params.breadcrumb.showHome (not .IsHome) -}} - {{ cond (and .Site.Params.breadcrumb.showHome .IsHome) (T "single.home") ((lower .LinkTitle | T) | default (title .LinkTitle)) }} + {{- if .IsHome | and (not .Site.Params.breadcrumb.showHome) -}} + {{- continue -}} {{- end -}} + + {{- $title := "" -}} + {{- with .Description -}} + {{- $title = . -}} + {{- else -}} + {{- $title = title .LinkTitle -}} + {{- if .IsPage | and .Summary -}} + {{- $title = .Summary -}} + {{- end -}} + {{- end -}} + + {{- $innerText := "" -}} + {{- if .IsHome -}} + {{- $innerText = T "single.home" -}} + {{- else -}} + {{- $innerText = ((T (add .TranslationKey ".breadcrumbTitle")) | default (lower .LinkTitle | T) | default .LinkTitle) | title -}} + {{- end -}} + + {{ $innerText }} {{- end -}} - {{ title .LinkTitle }} + + {{ (T (add .TranslationKey ".breadcrumbTitle")) | default (lower .LinkTitle | T) | default .LinkTitle | title }} {{- end -}}