mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-01-18 19:00:24 +00:00
Fix breadcrumbs on /content/_index
This commit is contained in:
parent
2f5722599e
commit
efd220cc3d
1 changed files with 13 additions and 11 deletions
|
@ -51,17 +51,19 @@
|
|||
{{ if and (not $isChapter) (.Params.toc) }}
|
||||
<span id="toc-menu"><a href=""><i class="fa fa-list-alt"></i></a></span>
|
||||
{{ end }}
|
||||
{{ $section := index .Site.Sections .Section }}
|
||||
{{ $sectionPage := $.Site.GetPage "section" $.Section }}
|
||||
{{ if $sectionPage.Content }}
|
||||
{{ $first := $.Site.GetPage "section" $.Section }}
|
||||
{{ if ne $first.UniqueID $.UniqueID }}
|
||||
<a href="{{ $first.RelPermalink }}" itemprop="url"><span itemprop="title">{{ $first.Title }}</span></a> <i class="fa fa-angle-right"></i>
|
||||
{{ end }}
|
||||
{{ else if gt $section.Len 0 }}
|
||||
{{ $first := (index $section 0).Page }}
|
||||
{{ if ne $first.UniqueID $.UniqueID }}
|
||||
<a href="{{ $first.RelPermalink }}" itemprop="url"><span itemprop="title">{{ $first.Title }}</span></a> <i class="fa fa-angle-right"></i>
|
||||
{{ if ne $.Section "" }}
|
||||
{{ $section := index $.Site.Sections $.Section }}
|
||||
{{ $sectionPage := $.Site.GetPage "section" $.Section }}
|
||||
{{ if $sectionPage.Content }}
|
||||
{{ $first := $.Site.GetPage "section" $.Section }}
|
||||
{{ if ne $first.UniqueID $.UniqueID }}
|
||||
<a href="{{ $first.RelPermalink }}" itemprop="url"><span itemprop="title">{{ $first.Title }}</span></a> <i class="fa fa-angle-right"></i>
|
||||
{{ end }}
|
||||
{{ else if gt $section.Len 0 }}
|
||||
{{ $first := (index $section 0).Page }}
|
||||
{{ if ne $first.UniqueID $.UniqueID }}
|
||||
<a href="{{ $first.RelPermalink }}" itemprop="url"><span itemprop="title">{{ $first.Title }}</span></a> <i class="fa fa-angle-right"></i>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ with .Title }}<span itemprop="title"> {{ . }}</span>{{ end }}
|
||||
|
|
Loading…
Reference in a new issue