title: Jekyll — Loop through posts with title and number
body: <p>I'm building a simple blog using Jekyll. I'm looping through all of my posts which works a treat. However, I'd like to add a number marker to each post. For example the first post would be marked with a 1, second with a 2... and so on.</p>
  
  <p>My current loop likes like this:</p>
  
  <pre><code>&lt;ol class="post-list"&gt;
    {% for post in site.posts %}
      &lt;li class="post-item"&gt;
        &lt;a class="post-link" href="{{ post.url | prepend: site.baseurl }}"&gt;
          &lt;div class="post-info"&gt;
            &lt;p&gt;Post #1&lt;/p&gt;
            &lt;h2&gt;{{ post.title }}&lt;/h2&gt;
          &lt;/div&gt;
        &lt;/a&gt;
      &lt;/li&gt;
    {% endfor %}
  &lt;/ol&gt;
  </code></pre>
  
  <p>I understand I need to add a count to this loop but I'm unsure how. </p>
  
  <p>Adding the following to my loop seems to make sense:</p>
  
  <pre><code>{% for num in (1...n) %}
  </code></pre>
  
  <p>But I'm not sure how to use this with my existing loop.</p>
  
  <p>Any help would be gratefully received.</p>