Assuming you have your gallery images in a structure like
-img -gallery -image1.png -image2.png etc.
You can access them in the collection or on the page as follows:
{% for image in site.static_files %} {% if image.path contains 'img/gallery' %} <p>{{image.path}} - {{image.modified_time}}</p> <img src="{{site.baseurl}}{{image.path}}"> {% endif %} {% endfor %}
This goes through all the static files and checks for a specific path ( img/gallery in this example).
Than access to metadata of a static file for this file. (I called it an “image” in this example, but you can call it whatever you want after the for keyword).
I think it doesn't make much sense to put something like this in a blog post, but rather in a page or collection .
source share