don't show empty See also for series (#166)

If series consists only of the current page it doesn't make sense to show an empty See also block.
This commit is contained in:
Artem Khvastunov 2019-04-02 01:11:27 +02:00 committed by Luiz F. A. de Prá
parent 903cfa0443
commit 3483f16f21
1 changed files with 2 additions and 2 deletions

View File

@ -2,10 +2,10 @@
{{ if .Params.series }} {{ if .Params.series }}
<section class="see-also"> <section class="see-also">
{{ range .Params.series }} {{ range .Params.series }}
<h3>See also in {{ . }}</h3>
{{ $name := . | urlize }} {{ $name := . | urlize }}
{{ $series := index $.Site.Taxonomies.series $name }} {{ $series := index $.Site.Taxonomies.series $name }}
{{ if gt (len $series.Pages) 0 }} {{ if gt (len $series.Pages) 1 }}
<h3>See also in {{ . }}</h3>
<nav> <nav>
<ul> <ul>
{{ $maxItems := $.Site.Params.maxSeeAlsoItems | default 5 }} {{ $maxItems := $.Site.Params.maxSeeAlsoItems | default 5 }}