Created
July 31, 2015 17:07
-
-
Save davebowker/21f0d54d8f29bfdfda19 to your computer and use it in GitHub Desktop.
Loop through all categories in your Jekyll Site.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {% for category in site.categories %} | |
| <div class="catbloc" id="{{ category | first | remove:' ' }}"> | |
| <h2>{{ category | first }}</h2> | |
| <ul> | |
| {% for posts in category %} | |
| {% for post in posts %} | |
| {% if post.url %} | |
| <li> | |
| <a href="{{ post.url }}"> | |
| <time>{{ post.date | date: "%-d %B %Y" }}</time> | |
| {{ post.title }} | |
| </a> | |
| </li> | |
| {% endif %} | |
| {% endfor %} | |
| {% endfor %} | |
| </ul> | |
| </div> | |
| {% endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment