title: How to list files in a directory with Liquid?
body: <p>I'm trying to learn how to use Jekyll along with Bootstrap; while studying them, I decided that I'd like to have an image carousel on my homepage. </p>
  
  <p>Since I'm really lazy I don't want to hard-code the paths needed to display every image inside the layout, and I wouldn't either prefer to use an array to store the list of images. </p>
  
  <p>I was wondering if there's any tag that could ask Jekyll to do these two steps:</p>
  
  <ol>
  <li>Look inside a specific directory</li>
  <li>For each file you found in that directory, repeat a block of code</li>
  </ol>
  
  <p>Basically what I'd like to write is something that vaguely resemble this piece of (imaginary) code:</p>
  
  <pre><code>{% for file in directory %}
      &lt;img src="{{ file.url }}" /&gt;
  {% endfor %}
  </code></pre>
  
  <p>So if, for example, I have a folder with three files named image01.jpg, image02.jpg, image03.jpg, I'd like that jekyll could build this HTML code for me:</p>
  
  <pre><code>&lt;img src="folder/image01.jpg" /&gt;
  &lt;img src="folder/image02.jpg" /&gt;
  &lt;img src="folder/image03.jpg" /&gt;
  </code></pre>
  
  <p>So I had a look at <a href="https://github.com/Shopify/liquid/wiki/Liquid-for-Designers" rel="noreferrer">this reference page</a> but I haven't found anything useful for my purpose. </p>
  
  <p>Please, could you give me any suggestion, and if possible, one that doesn't involve the use of a plugin?</p>
  
  <p>Thank you in advance.</p>