frankwinter
12/21/2017 - 9:52 AM

Combine first and after to make a more complicated query

You can combine first and after to make a more complicated query. I am showing 3 featured posts after skipping the first one. I am also showing a featured_image that was in the content markdown in the front matter. This is the top area with the title and other parameters in your markdown post.

{{ range after 1 (first 3 .Site.Taxonomies.tags.featured) }}
<div>
  {{ with .Page.Params.featured_image }}<img src="{{ . }}">{{ end }}
  <h5><a href="{{ .Page.Permalink }}">{{ .Page.Title }}</a></h5>
</div>
{{ end }}