Hello Hugo friends!
Hopefully you can help us with our breadcrumb code we have currently so it will not show the current level page of breadcrumb. We are $Scratch’in our heads!
{{ $siteUrl := replace .Permalink ( printf "%s" .Site.BaseURL) "" }}
{{ $.Scratch.Add "sitePath" .Site.BaseURL }}
{{ $.Scratch.Add "siteBreadcrumbs" (slice (dict "url" .Site.BaseURL "name" "home" "position" 1 )) }}
{{ range $index, $element := split $siteUrl "/" }}
{{ $.Scratch.Add "sitePath" $element }}
{{ $.Scratch.Add "sitePath" "/" }}
{{ if ne $element "" }}
{{ $.Scratch.Add "siteBreadcrumbs" (slice (dict "url" ($.Scratch.Get "sitePath") "name" . "position" (add $index 2))) }}
{{ end }}
{{ end }}