HUGO

Manage / display a subset of images (newbie)

Using readDir we get FileInfo objects. How can I access the front matter stored in those?
I’m trying to do this because we want to have a subset of the images in /static/images appear in our footer. Using Netlify CMS I’ve reached the point of being able to store paths to the chosen images in markdown files in a specified folder. I can loop through them but I need to access their content within a footer partial.
Am I going about this the wrong way?

Unable to get past:
<.GetPage>: can’t evaluate field GetPage in type os.FileInfo

Can you provide a git repository of the project, or a simplied version of it? Without that, I would just be guessing.

In the process of creating a simplified version - I figured out how to do what I was trying to do. I still don’t know any way to access the contents of a md file from a random folder but the fact I was trying to do this indicated there was a better way: put data in the /data folder, it’s easy to access then. The full thing was described here: