mirror of
https://github.com/Vimux/Binario.git
synced 2024-11-23 14:38:36 +00:00
7f3f0ece7c
Added possibility to set the maximum number of posts that can be displayed in related block
13 lines
No EOL
441 B
HTML
13 lines
No EOL
441 B
HTML
{{ $relatedMax := .Site.Params.relatedMax | default 5 }}
|
|
{{ $related := .Site.RegularPages.Related . | first $relatedMax }}
|
|
|
|
{{ if and ($related) (.Param "related") }}
|
|
<div class="related block">
|
|
<h3 class="related__title">{{ T "related_title" }}</h3>
|
|
<ul class="related__list">
|
|
{{ range $related }}
|
|
<li class="related__item"><a class="related__link" href="{{ .RelPermalink }}">{{ .Title }}</a></li>
|
|
{{ end }}
|
|
</ul>
|
|
</div>
|
|
{{ end }} |