I'm still looking for an answer to the original question.
Here's another question: Is there a way to do this?
{% for category in sites.categories %}
{% for posts in category | last %}
That said, I've found a few nasty hackish workaround that don't work with jekyll alone (on github, for example):
And a nasty hackish workaround that I created:
---
layout: default
title: Fastr Blog
---
<h2>Categories:</h2>
<ul>
{% for category in site.categories %}
<li><a href="#{{ category | first }}">{{ category | first }}</a></li>
{% endfor %}
</ul>
<h2>Articles by Category:</h2>
<ul>
{% for category in site.categories %}
<li><a name="{{ category | first }}">{{ category | first }}</a>
<ul>
{% for posts in category %}
{% for post in posts %}
<li><a href="{{ post.url }}">{{ post.title }}</a></li>
{% endfor %}
{% endfor %}
</ul>
</li>
{% endfor %}
</ul>
{% for post in site.categories.quickstart %}
<!-- h2><a href=".{{ post.url }}">{{ post.title }}</a></h2 -->
<!-- {{ post.content }} -->
{% endfor %}
Page generated: {{ site.time | date_to_string }}
Since categories is internally passes `do |category, posts|` it looks like an array where `category | first` is the category name and `category | last` is the array of posts. `category | first` isn't treated as an iterable, so it just gets skipped over in `for post in posts`. So it happens to work, but it's incorrect.
AJ ONeal