{{ $related := (where (.Site.RegularPages.Related .) "Type" "posts") | first 5 }}
{{ with $related }}
<h2>Related Posts</h3>
<ul>
    {{ range . }}
	<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
	{{ end }}
</ul>
{{ end }}