mirror of
https://github.com/gcushen/hugo-academic.git
synced 2025-07-26 19:15:16 +02:00
feat: add breadcrumb to all pages
With `show_breadcrumb: true` in front matter
This commit is contained in:
parent
0f612575bc
commit
9e1704c71f
1 changed files with 10 additions and 0 deletions
|
@ -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>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue