I have this in my front page template:
{{- range where .Pages "Params.featured" "true" -}}
<li>
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
<!-- <div class="summary">{{.Summary}}</div> -->
</li>
{{- end -}}
and I have this in some of my post front-matter blocks:
---
date: 2019-05-07T13:30:00-07:00
title: Beer Tourism
type: posts
tags:
- Travel
- Beer
images:
- /images/beer_tourism.jpg
description: Finding interesting beer while traveling
featured: true
---
but the range statement isn’t returning anything. If I switch it to something like range (first 3 .Pages)
that works as expected, but I would rather be pulling up a list of posts based on this front-matter value.
Can someone explain how the where should be used, and what I’m doing wrong?
Thanks!