{% for image in site.static_files %} {% if image.path contains include.gallery_path %} {% unless image.path contains '.md' %} {% endunless %} {% endif %} {% endfor %}