revises related post, adds option to enable/disable

This commit is contained in:
Huy Tran 2018-07-30 07:23:49 +10:00
parent f34f7ad13c
commit c5ab13bf48

View file

@ -1,3 +1,4 @@
{{ if .Site.Params.relatedPosts }}
{{ $related := .Site.RegularPages.Related . | first 5 }}
{{ with $related -}}
<div class="post__related">
@ -7,4 +8,5 @@
{{ partial "posts-list.html" . }}
</ul>
</div>
{{- end }}
{{ end }}
{{ end }}