Ver Fonte

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.
Artem Khvastunov há 6 anos atrás
pai
commit
3483f16f21
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      layouts/partials/posts/series.html

+ 2 - 2
layouts/partials/posts/series.html

@@ -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 }}