{{ $num_to_show := .Site.Params.related_content_limit | default 7 }} {{ $related := .Site.RegularPages.Related . | first $num_to_show }} {{ with $related }} {{ end }}