Fix breadcrumbs on /content/_index

This commit is contained in:
Nikolay Yakimov 2017-03-27 23:37:46 +03:00
parent 2f5722599e
commit efd220cc3d
No known key found for this signature in database
GPG key ID: 8E9303568F9B9650

View file

@ -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 }}