I have a folder structure like this:
/gallery/images/category1/
/gallery/images/category2/
/gallery/images/category3/
/gallery/images/category4/
/gallery/images/category5/
and so on..
Inside each of these folders is a bunch of images. However, these category folders always change, names as well.
My goal is for jekyll auto to create a separate page for each of these categories. Then on this page, scroll through each image in this folder and show it on the page.
I need help:
- How can I find in a folder
/gallery/imagesand grab all folders - As soon as I recognize all the folders, how do you create a page, such as
/gallery/[FOLDER_NAME].htmlfor each of them
As soon as I can do this, I know that I can follow the contents of the page and be fine.
{% for image in site.static_files %}
{% if image.path contains 'gallery/{{ FOLDER_NAME }}' %}
<img src="{{ site.baseurl }}{{ image.path }}" />
{% endif %}
{% endfor %}
Any help or guidance is appreciated.
bryan