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) }} {{ if and (not $isChapter) (.Params.toc) }}
<span id="toc-menu"><a href=""><i class="fa fa-list-alt"></i></a></span> <span id="toc-menu"><a href=""><i class="fa fa-list-alt"></i></a></span>
{{ end }} {{ end }}
{{ $section := index .Site.Sections .Section }} {{ if ne $.Section "" }}
{{ $sectionPage := $.Site.GetPage "section" $.Section }} {{ $section := index $.Site.Sections $.Section }}
{{ if $sectionPage.Content }} {{ $sectionPage := $.Site.GetPage "section" $.Section }}
{{ $first := $.Site.GetPage "section" $.Section }} {{ if $sectionPage.Content }}
{{ if ne $first.UniqueID $.UniqueID }} {{ $first := $.Site.GetPage "section" $.Section }}
<a href="{{ $first.RelPermalink }}" itemprop="url"><span itemprop="title">{{ $first.Title }}</span></a> <i class="fa fa-angle-right"></i> {{ if ne $first.UniqueID $.UniqueID }}
{{ end }} <a href="{{ $first.RelPermalink }}" itemprop="url"><span itemprop="title">{{ $first.Title }}</span></a> <i class="fa fa-angle-right"></i>
{{ else if gt $section.Len 0 }} {{ end }}
{{ $first := (index $section 0).Page }} {{ else if gt $section.Len 0 }}
{{ if ne $first.UniqueID $.UniqueID }} {{ $first := (index $section 0).Page }}
<a href="{{ $first.RelPermalink }}" itemprop="url"><span itemprop="title">{{ $first.Title }}</span></a> <i class="fa fa-angle-right"></i> {{ 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 }}
{{ end }} {{ end }}
{{ with .Title }}<span itemprop="title"> {{ . }}</span>{{ end }} {{ with .Title }}<span itemprop="title"> {{ . }}</span>{{ end }}