Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 27 additions & 23 deletions common-theme/layouts/partials/breadcrumbs.html
Original file line number Diff line number Diff line change
@@ -1,30 +1,34 @@
{{ with .Parent }}
<nav class="c-breadcrumbs">
<ol class="c-breadcrumbs__list">
{{/* Skip the first ancestor which is the root page for the whole site - we already have a link here in the site logo. */}}
{{- range after 1 .Ancestors.Reverse }}
<li class="c-breadcrumbs__item">
<a
class="c-breadcrumbs__link"
href="{{ .RelPermalink }}"
{{- if eq (len .Ancestors) 1 -}}
data-pagefind-filter="module"
{{- end -}}
><span class="c-breadcrumbs__text">{{ .Title }}</span>
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
width="24px"
stroke-width="1.5"
stroke="currentColor"
class="c-breadcrumbs__icon">
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M8.25 4.5l7.5 7.5-7.5 7.5" />
</svg>
</a>
</li>
{{/* Skip any ancestors that don't have a link, e.g. ones that set build.render = "never". */}}
{{ if .RelPermalink }}
<li class="c-breadcrumbs__item">
<a
class="c-breadcrumbs__link"
href="{{ .RelPermalink }}"
{{- if eq (len .Ancestors) 1 -}}
data-pagefind-filter="module"
{{- end -}}
><span class="c-breadcrumbs__text">{{ .Title }}</span>
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
width="24px"
stroke-width="1.5"
stroke="currentColor"
class="c-breadcrumbs__icon">
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M8.25 4.5l7.5 7.5-7.5 7.5" />
</svg>
</a>
</li>
{{- end }}
{{- end }}
{{ if ne .Params.Build.render "never" }}
<li class="c-breadcrumbs__item">
Expand Down
Loading