diff options
author | Fabrizio W <fabrizio2210@gamil.com> | 2021-03-26 18:41:47 +0300 |
---|---|---|
committer | Fabrizio W <fabrizio2210@gamil.com> | 2021-03-26 18:41:47 +0300 |
commit | 8a80900f473c39e003b3de2af06318afedbf98f5 (patch) | |
tree | 112fd974df6b671fe9078464dd5fa3e6668d736e /layouts | |
parent | d26da9a1a0039a50105cd5c602f7a7dfefae0772 (diff) |
Navigation bar uses title of the pages to compose the breadcrumb
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/partials/header.html | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 405b354..c301ed2 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -23,11 +23,11 @@ <!-- Build the breadcrumb - base URL link, path links for each dir, cur location text --> <a href="{{ .Site.BaseURL }}"><strong>{{ .Site.Title }}</strong></a> {{- if gt $use_part_cnt 0 -}} - {{- range $cur_ind, $element := first (sub $use_part_cnt 1) $url_parts -}} - {{- $path := delimit (first (add $cur_ind 1) $url_parts) "/" }} - / <a href="{{ $.Site.BaseURL }}{{ $path }}"><strong>{{ $element | humanize }}</strong></a> + {{- range $cur_ind, $_ := first (sub $use_part_cnt 1) $url_parts -}} + {{- $path := string (delimit (first (add $cur_ind 1) $url_parts) "/") }} + / <a href="{{ $.Site.BaseURL }}{{ $path }}"><strong>{{ with $.Site.GetPage $path }}{{ .Title }}{{ end }}</strong></a> {{- end }} - / {{ (index $url_parts (sub $use_part_cnt 1)) | humanize }} + / {{ .Title }} {{- end }} </h1> {{ partial "navigation.html" . }} |