2022-09-12 16:29:32 -07:00
|
|
|
<!-- Based on https://gohugo.io/content-management/sections/#example-breadcrumb-navigation -->
|
|
|
|
|
|
|
|
<!-- Don't show the breadcrumb on the main docs landing page. -->
|
|
|
|
{{ if ne .RelPermalink "/docs/" }}
|
2023-05-21 10:59:32 -07:00
|
|
|
<ol class="docs-breadcrumb">
|
2022-09-12 16:29:32 -07:00
|
|
|
{{ template "breadcrumbnav" (dict "p1" . "p2" .) }}
|
|
|
|
</ol>
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ define "breadcrumbnav" }}
|
|
|
|
<!-- Don't include the website home page in the breadcrumb. -->
|
|
|
|
{{ if and .p1.Parent (ne .p1.Parent .p1.Site.Home) }}
|
|
|
|
{{ template "breadcrumbnav" (dict "p1" .p1.Parent "p2" .p2) }}
|
|
|
|
{{ end }}
|
|
|
|
<!-- If the page is a redirect page, don't include it in the breadcrumb. -->
|
|
|
|
{{ if not (isset .p1.Params "redirect_to") }}
|
|
|
|
<li {{ if eq .p1 .p2 }}class="active"{{ end }}><a data-track="breadcrumb" href="{{ .p1.RelPermalink }}">{{ .p1.LinkTitle }}</a></li>
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|