virtuallypotato/layouts/partials/related.html

13 lines
574 B
HTML

{{ if isset .Params "series" }}
{{$related := where .Site.RegularPages ".Params.series" "eq" .Params.series }}
{{- $relatedLimit := default 8 .Params.numberOfRelatedPosts }}
<h2 class="post_related">{{ T "series_posts" }} {{ .Params.series }}</h2>
<ul>
{{ range first $relatedLimit $related }}
<li><a href="{{ .Permalink }}" class="nav-link" title="{{ .Title }}">{{ .Title }}</a></li>
{{ end }}
{{ if gt (len $related) $relatedLimit }}
<li><a href="/series/{{ lower .Params.series }}/">See all {{ .Params.series }}</a></li>
{{ end }}
</ul>
{{ end }}