<div class="widget widget-latest-post">
    <h4 class="widget-title">{{ i18n "latest_posts" }}</h4>
    {{ range first 4 (where site.Pages "Type" "post") }}
    <div class="media">
      <a class="pull-left" href="{{ .RelPermalink }}">
        {{ if isset .Params "image" }}
        <img class="media-object" src="{{ .Params.image | relURL }}" alt="{{ .Title }}">
        {{ end }}
      </a>
      <div class="media-body">
        <h4 class="media-heading"><a href="{{ .RelPermalink }}">{{ .Title }}</a></h4>
        <p>{{ .Summary | truncate 50 }}</p>
      </div>
    </div>
    {{ end }}
  </div>
