I have my image assets divided thus:
/assets/
- /images/
-- /articles/
-- /answers
-- /podcast/
All three of these content types - answers, podcasts, and articles - use categories.
On the categories list page, I have the following code to grab the image and pull it into a card:
{{- $image := printf "/images/articles/%s" .Params.feature -}}
{{- $image = (resources.Match $image).Resize "400x webp q80" -}}
Obviously this fails to build because sometimes the image is located in /images/answers/
or /images/podcast
.
My question is, how can I wild-card that middle folder?
I tried **
but it didn’t work (IE: printf "/images/**/%s" .Params.feature
).