I’m building a single-page site in Hugo for a friend.
There’s a section with an image grid fed by a partial. There could be as many as 80 images within the grid.
I’d like to range over each image source location and include data for the alt-tag.
I’m thinking I don’t need a new
content type to achieve this, but am not sure how to best implement it.
Put a file in
/datathat references (a) the local image source, (b) the alt tag
Use a page bundle approach to range over images, but if I do that I’m not sure where the alt-tag data would go, and how to sync the alt tag value with its respective image.
My Hugo skills are a bit above beginner, so if the leanest approach would involve complex match/slice code it would be great if you could include some refs.
Thanks very much for the help!