Why does Resources.Match return all resources?

Hello,

I’ve got another problem (or maybe misunderstanding?) with page resources.

In my front matter, I define a number of resources, especially only one image within a certain directory (here: “gallery”)

resources:
- src: "images/gallery/blumenjahr_doris_koerner.jpg"
  title: "XXXX xxxx"

However, there are a number of additional images in the “gallery” directory, too, but they are not referenced in resources.

When I retrieve the resources with $.Page.Resources.Match and the parameter “images/gallery/*.jpg”, I’d expect, that I get only the one image resource, I defined in front matter, but I get all images from the folder, including all those, which are not represented in front matter.

Currently the only way to show only the images, defined in the front matter resources is, to add a parameter to the resource and to filter the list, but that’s not very intuitive and it feels wrong.

What am I missing here?

The project is in git at git@gitlab.com:clorenz/lenzula.git and the page in question is /buecher/bluehende-quilts/

Thank you very much
Chris

  • Every image inside that directory will be added as a Resource
  • The front matter is a way to add metadata to those. You don’t have to, they will get default metadata from their names etc.

Thank you very much, is there another way to work with a customized list of image resources? It would be perfect for a picture gallery, where not every image in a folder shall be displayed by default.

At some point you need to decide what to include in the gallery:

  1. What you put into the folder
  2. Or what you ask for in Match, e.g. Match "pretty*.jpg"

The two above should give you endless options.