Query subset of Pages

I’ve tried to look at the other similar questions but can’t seem to get a query that works.

In my site.yml I’ve got a ‘pages’ field type displaying all child pages:

pages:
  type: pages
  label: Pages

This works fine, but I’d like to reduce this to a particular subset of pages. If I wanted to show ‘home’, ‘about’ and ‘error’, how could I assemble this query? I expected this to work:

pages:
  type: pages
  label: Pages
  query: site.index.filterBy("template", "in", ["about", "Error", "Home"])

I also tried every other combination and version I could think of, including suggestions from other similar forum questions, but it always shows all child pages.

query: site.template("about")
query: site.template('about')
query: site.children.filterBy("template", "about")
query: site.children.filterBy("template", 'about')
query: site.index.filterBy("template", "in", ["About", "error", "home"])

I also tried using with:

pages:
  type: pages
  label: Pages
  options: query
  query: **tried everything here**

Hm, this first one should actually work. What Kirby version are you using?

Thanks, @texnixe. I thought it should work too. I am using Kirby 3.2.2.

Could it be to do with the quotation marks? i.e. " vs ' ? I saw this forum post where type of quotes seems to matter: Query language query

No, your double quotes are perfect. I tested in my install (currently 3.2.4-rc1) and it worked, but should work since 3.2.0.