I have a site with a bunch of static pages, plus a blog.
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 blog/
.
I’m failing to figure out the syntax for this. So far, I have:
{{- range (.Paginate ( first 3 .Pages.ByDate )).Pages }}
<li><a href="{{ .Permalink }}">{{ .Title }}</a></li>
{{- end}}
but I need to also filter by directory blog/
. This is in my layouts/index.html
template. How do I do this?
(P.S. Where is the best description how this language works? I can’t even parse how the above statement functions…)