I found this code snipped Breadcrum with branch section support
It works fine, but there is a small mistake. Please take a look at the screenshot The third link has a lowercase letter. I would like to have an Uppercase letter.
content/company/brand-guidelines.md
---
title: "brand-guidelines"
description: "Brand guidelines"
draft: false
---
i18n
{
"Brand guidelines": "Brand guidelines"
}
partials/breadcrumbs.html
<nav class="" aria-label="breadcrumb ">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">{{i18n "Home" }}</a></li>
{{ $lastUrlElement := index (last 1 (split (delimit (split .RelPermalink "/") "," "") ",")) 0 }}
{{- $.Scratch.Set "url" "" -}}
{{- range (split .RelPermalink "/") -}}
{{- if (gt (len .) 0) -}}
{{- $.Scratch.Set "isSection" "false" -}}
{{- $.Scratch.Set "isPage" "false" -}}
{{- $.Scratch.Add "url" (print "/" . ) -}}
{{- if $.Site.GetPage (print . ".md") -}}
{{- with $.Site.GetPage (print . ".md") -}}
{{- if .IsPage -}}
{{- $.Scratch.Set "isPage" "true" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- if eq ($.Scratch.Get "isPage") "true" -}}
{{- with $.Site.GetPage (print . ".md") -}}
<li class="breadcrumb-item active" aria-current="page"><a href="{{ $.Scratch.Get `url` }}">
{{ if (eq (i18n .Title) "" ) }} {{ .Title }}{{ else }}{{ i18n .Title }}{{ end }}</a></li>
{{- end -}}
{{- else -}}
{{- if eq $lastUrlElement . -}}
<li class="breadcrumb-item active"><a href="{{ $.Scratch.Get `url` }}">{{ if (eq (i18n (humanize . )) "" ) }} {{
humanize .}}{{ else }}{{ i18n (humanize . ) }}{{ end }}</a></li>
{{- else -}}
<li class="breadcrumb-item"><a href="{{ $.Scratch.Get `url` }}">{{ if (eq (i18n (humanize . )) "" ) }} {{ humanize
.}}{{ else }}{{ i18n (humanize . ) }}{{ end }}</a></li>
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}
</ol>
</nav>