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:
parent
903cfa0443
commit
3483f16f21
|
@ -2,10 +2,10 @@
|
|||
{{ if .Params.series }}
|
||||
<section class="see-also">
|
||||
{{ range .Params.series }}
|
||||
<h3>See also in {{ . }}</h3>
|
||||
{{ $name := . | urlize }}
|
||||
{{ $series := index $.Site.Taxonomies.series $name }}
|
||||
{{ if gt (len $series.Pages) 0 }}
|
||||
{{ if gt (len $series.Pages) 1 }}
|
||||
<h3>See also in {{ . }}</h3>
|
||||
<nav>
|
||||
<ul>
|
||||
{{ $maxItems := $.Site.Params.maxSeeAlsoItems | default 5 }}
|
||||
|
|
Loading…
Reference in New Issue