Hello,
I try to show the last 3 news on my homepage but it does not work as I would like.
The following shows duplicates:
{{ range first 3 (where .Site.RegularPages "Type" "news") }}
<div class="col"><a href="{{ .Permalink }}">{{ .Title }}</a></div>
{{ end }}
If I count the following:
{{ $posts := (where .Site.RegularPages "Type" "news") }}
{{ $postCount := len $posts }}
So it returns 4 even though I only have 2 news posts?
What am I doing wrong here?