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 }}
|
{{ 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 }}
|
||||||
|
|
Loading…
Reference in New Issue