about summary refs log tree commit diff
path: root/layouts/partials/breadcrumbs.html
blob: c4fcef48015f83d90f640c0a855e36bf197d4a44 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{{ $crumbs := .Ancestors.Reverse }}
{{ if not .Site.Params.OnlyBooks }}
{{ $crumbs = where $crumbs "Params.categories" "intersect" (slice "book") }}
{{ end }}
<nav aria-label="breadcrumb" class="breadcrumb">
  <ol>
    {{ range $crumbs }}
      <li>
        <a href="{{ .Permalink }}">{{ .LinkTitle }}</a>
      </li>
    {{ end }}
    <li class="active">
      <a aria-current="page">{{ .LinkTitle }}</a>
    </li>
  </ol>
</nav>