Last active
August 29, 2015 14:18
-
-
Save mickmaccallum/589c6c177f9a502dec66 to your computer and use it in GitHub Desktop.
Jekyll posts by category with HTML description list (dl)
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
<section class="posts"> | |
{% for category in site.categories %} | |
<dl> | |
<dt> | |
{{ category | first | capitalize }} | |
</dt> | |
{% for posts in category %} | |
{% for post in posts %} | |
{% if post.url %} | |
<dd> | |
<a class="post-link" href="{{ post.url }}"> | |
{{ post.title }} | |
</a> | |
</dd> | |
{% endif %} | |
{% endfor %} | |
{% endfor %} | |
</dl> | |
{% endfor %} | |
</section> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment