title: Jekyll forloop.last --> before last?
body: <p>I made a dummy "related posts" in <em>Jekyll 3.2.1</em> with the following solution:</p>
  
  <pre><code>    {% for post in site.posts limit: 4 %}
      {% if page.author == post.author and page.title != post.title %}
      &lt;div class="post-stream-item"&gt;
      &lt;a href="{{ post.url | prepend: site.baseurl }}" title="{{ post.title  }}"&gt;&lt;div class="post-stream-content"&gt;
          &lt;img src="{{ post.thumbnail }}" width="80" height="auto" /&gt;&lt;span class="post-stream-item-meta"&gt;&lt;h3&gt;{{ post.title }}&lt;/h3&gt;&lt;p&gt;{{ post.author }} on {{ post.date | date: "%b %-d, %Y" }} •     {% assign words = post.content | number_of_words %}
          {% if words &lt;= 160 %}
          1 min
          {% else %}
          {{ words | plus: 159 | divided_by:160 }} mins
          {% endif %} read&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/a&gt;&lt;/div&gt;{% if forloop.last == false %}&lt;hr&gt;{% endif %}
  
          {% endif %}
          {% endfor %}
  </code></pre>
  
  <ol>
  <li>The for loop iterates through the posts list in the site and gives
  it a limit</li>
  <li>If the author of the current post is the same as the author of the
  iterated post, but the title is not the same, then it fills out the
  jinja bindings.</li>
  </ol>
  
  <p><strong>The problem is with the</strong> <code>{% if forloop.last == false %}&lt;hr&gt;{% endif %}</code> <strong>part, cause if there is more iterable (post) in the forloop, it will display the</strong> <code>&lt;hr&gt;</code> <strong>tag, even if it's the last element shown to the user</strong>.</p>
  
  <p>Is there any attribute to refer to the penultimate element of the list or any better solution to this?</p>