Add a page navigation breadcrumb
This thing looks like a path. It lists the hierarchy of pages from the home page.
This commit is contained in:
parent
54c371d7e6
commit
d1154de459
3 changed files with 10 additions and 12 deletions
|
@ -3,11 +3,10 @@
|
|||
{{ range .Ancestors.Reverse }}
|
||||
{{- $title := .LinkTitle -}}
|
||||
{{- if .IsHome -}}
|
||||
{{ $title = "/" }}
|
||||
<li class="nav-breadcrumb__home"><a href="{{ .Permalink }}">{{ i18n "home" }}</a></li>
|
||||
{{ else }}
|
||||
<li><a href="{{ .Permalink }}">{{ $title }}</a></li>
|
||||
{{- end -}}
|
||||
<li><a href="{{ .Permalink }}">{{ $title }}</a></li>
|
||||
{{ end }}
|
||||
|
||||
<li class="nav-breadcrumb__active"><a href="{{ .Permalink }}">{{ .LinkTitle }}</a></li>
|
||||
</ol>
|
||||
</nav>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue