mirror of
https://github.com/13hannes11/hugo-coder-timeline.git
synced 2024-09-04 00:50:58 +02:00
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:
committed by
Luiz F. A. de Prá
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 }}
|
||||
|
||||
Reference in New Issue
Block a user