feat: add breadcrumb to all pages

With `show_breadcrumb: true` in front matter
This commit is contained in:
George Cushen 2022-01-20 21:37:57 +00:00
commit 9e1704c71f

View file

@ -35,6 +35,16 @@
</div>
<div class="page-body">
{{/* Breadcrumb */}}
{{/* Don't apply to Book layout as that has different breadcrumb placement. */}}
{{ if .Params.show_breadcrumb | and (ne .Type "book") }}
<!-- Use page bg color rather than any color applied to article-container. -->
{{ $class := cond .IsSection "universal-wrapper" "article-container" }}
<div class="{{$class}} py-1" style="background: initial">
{{ partial "components/breadcrumb" . }}
</div>
{{ end }}
{{ block "main" . }}{{ end }}
</div>