{{ $opts := dict
  "document" .
  "indices" (slice "tags")
}}
{{ $related := .Site.RegularPages.Related . | first 5 }} {{ with $related }}
<h3>Related Posts</h3>
<ul>
  {{ range . }}
    {{ if and (eq .Section "posts") .IsPage }}
      <li>
        <a href="{{ .RelPermalink }}">{{ .Title }}</a> // <strong>{{ .Date | time.Format "2006" }}</strong>, {{ .Date | time.Format "January 2" }}<br />
        <small>{{ .Summary | emojify }}</small>
      </li>
    {{ end }}
  {{ end }}
</ul>
{{ end }}