{{ $num_to_show := .Site.Params.related_content_limit | default 7 }}
{{ $related := .Site.RegularPages.Related . | first $num_to_show }}
{{ with $related }}
  <aside>
    <header>Related Content</header>
    <ul>
      {{ range . }}
        <li><a href="{{ .RelPermalink }}">{{ .Title }}</a>
        <time datetime="{{ .ReadingTime }}M">{{ .ReadingTime }} minutes</time>
      {{ end }}
    </ul>
  </aside>
{{ end }}
