virtuallypotato/layouts/partials/related.html

14 lines
579 B
HTML
Raw Permalink Normal View History

{{ if isset .Params "series" }}
{{$related := where .Site.RegularPages ".Params.series" "eq" .Params.series }}
{{- $relatedLimit := default 8 .Site.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 }}