<div class="widget widget-latest-post">
    <h4 class="widget-title">最新文章</h4>
    {{ range first 4 (where site.Pages "Type" "blog") }}
    <div class="media">
      <div class="mb-3">
        <a href="{{ .Permalink }}">
          <img class="img-fluid" src="{{ .Params.Image | relURL }}" alt="{{ .Title }}">
        </a>
      </div>
      <div class="media-body">
        <h4 class="media-heading"><a href="{{ .Permalink }}">{{ .Title }}</a></h4>
        <p>{{ .Summary | truncate 40 }}</p>
      </div>
    </div>
    {{ end }}
  </div>