title: Display 3 most recent blog posts in Hugo (but not other pages)
body: <p>I have a site with a bunch of static pages, plus a blog, in Hugo.</p>
  
  <p>On the front page, I'd like to create short links to the three most recent blog posts (but not to any possibly recently modified static page). The blog posts are all in directory <code>blog/</code>.</p>
  
  <p>I'm failing to figure out the syntax for this. So far, I have:</p>
  
  <pre><code>{{- range (.Paginate ( first 3 .Pages.ByDate )).Pages }}
      &lt;li&gt;&lt;a href="{{ .Permalink }}"&gt;{{ .Title }}&lt;/a&gt;&lt;/li&gt;
  {{- end}}
  </code></pre>
  
  <p>but I need to also filter by directory <code>blog/</code>. This is in my <code>layouts/index.html</code> template.</p>