title: How do I shuffle the order of an array in Jekyll?
body: <p>Specifically I'm looking to list an array's contents in random order on a page each time it is generated.</p>
  
  <p>So, given <code>page.array = [1, 2, 3]</code> the following:</p>
  
  <pre><code>{% for i in page.array %}
    &lt;p&gt;{{ i }}&lt;/p&gt;
  {% endfor %}
  
  &lt;!-- 
    Yields:
    &lt;p&gt;1&lt;/p&gt;
    &lt;p&gt;2&lt;/p&gt;
    &lt;p&gt;3&lt;/p&gt;
  --&gt;
  </code></pre>
  
  <p>How do I randomize that order? (hopefully with syntax somewhat like the following)</p>
  
  <pre><code>{% for i in page.array.shuffle %}
    &lt;p&gt;{{ i }}&lt;/p&gt;
  {% endfor %}
  
  &lt;!--
    Yielding something like this, or a random reordering:
    &lt;p&gt;3&lt;/p&gt;
    &lt;p&gt;1&lt;/p&gt;
    &lt;p&gt;2&lt;/p&gt;
  --&gt;
  </code></pre>