Use section _index.md titles in docs breadcrumbs instead of humanized URL slugs (#2290)

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Abdon Pijpelink
2026-04-22 09:16:27 +02:00
committed by GitHub
co-authored by Claude Sonnet 4.6
parent 7bbc520de9
commit b93c8379e2
2 changed files with 4 additions and 2 deletions
@@ -1,5 +1,5 @@
---
title: Home
title: Documentation
weight: 2
hideTOC: true
breadcrumb: false
@@ -5,7 +5,9 @@
{{ range first $len $paths }}
{{ if gt (len . ) 0 }}
{{ $rellink = printf "%s/%s" $rellink . }}
<li class="docs-breadcrumbs__crumb"><a href="{{ $rellink }}/">{{ humanize . }}</a></li>
{{ $section := $.Site.GetPage $rellink }}
{{ $label := cond (ne $section nil) $section.Title (humanize .) }}
<li class="docs-breadcrumbs__crumb"><a href="{{ $rellink }}/">{{ $label }}</a></li>
<li class="docs-breadcrumbs__crumb-separator"></li>
{{ end }}
{{ end }}