Hello,
I’m porting a website to zola and I was wondering if there is a way to iterate over the files of a directory in the source tree (e.g. in static).
The use case is to implement a statically generated image gallery: a directory will contain all the images of the gallery, with a loop I want to iterate over all the files of that directory, produce the thumbnails and link to the full resolution image.
Is it possible to do so? I couldn’t find a way.
Thanks!
Well, not necessary only from static and actually for the same use case (gallery) being able to access co-located data would be great, too.
In hugo I used to have shortcodes for adding a gallery to a page, so it also makes sense, to me, to have a directory that contains the page for a topic and the gallery/galleries to be displayed in that page.
Sorry to bump this, but I found this topic on Google and I’m wondering if such function was added? I wanted to create a gallery on my index page, and I currently have to list all the stuff myself. Using assets doesn’t seem to work reliably since index is a section, not a page