title: For loop, wrap every two posts in a div
body: <p>Basically, I am using <a href="http://jekyllrb.com/" rel="noreferrer">Jekyll</a> (which uses the <a href="http://liquidmarkup.org/" rel="noreferrer">Liquid</a> templating language) and I am trying to write a <code>for</code> loop which wraps every two items in a <code>div</code>.</p>
  
  <p>This is my current loop:</p>
  
  <pre><code>&lt;div&gt;
    {% for post in site.posts %}
      &lt;a href="{{ post.url }}"&gt;{{ post.title }}&lt;/a&gt;
    {% endfor %}
  &lt;/div&gt;
  </code></pre>
  
  <p>Which would output four posts like so:</p>
  
  <pre><code>&lt;div&gt;
    &lt;a href="#"&gt;Title&lt;/a&gt;
    &lt;a href="#"&gt;Title&lt;/a&gt;
    &lt;a href="#"&gt;Title&lt;/a&gt;
    &lt;a href="#"&gt;Title&lt;/a&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>My desired output for four posts is:</p>
  
  <pre><code>&lt;div&gt;
    &lt;a href="#"&gt;Title&lt;/a&gt;
    &lt;a href="#"&gt;Title&lt;/a&gt;
  &lt;/div&gt;
  
  &lt;div&gt;
    &lt;a href="#"&gt;Title&lt;/a&gt;
    &lt;a href="#"&gt;Title&lt;/a&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>How can I accomplish this?</p>