Sha256: 00129bdcfa0d44d07694edcebbb0ac9c24590a8b23cdb52deca3c96df7772e23
Contents?: true
Size: 792 Bytes
Versions: 5
Compression:
Stored size: 792 Bytes
Contents
--- title: Posts listed by Category layout: default # this file would be used with catag-old.html in _includes and expects to be in the blogPath directory --- <!-- Jekyll makes the categories available to us at site.categories. Iterating over site.categories on a page gives us another array with two items, the first item is the name of the category and the second item is an array of posts in that category. --> {% assign sortedCats = site.categories | sort %} {% for category in sortedCats %} {% assign cat = category[0] %} {% unless cat == "blog" %} <section id="{{ cat }}"> <h2>{{ cat }}</h2> <ul> {% for post in category[1] %} <li><a href="{{ post.url }}">{{ post.title }}</a></li> {% endfor %} </ul> </section> {% endunless %} {% endfor %}
Version data entries
5 entries across 5 versions & 1 rubygems