Last active
April 25, 2018 01:58
-
-
Save bazuzu931/844fccf6f9f56e393e57e93cd59d786f to your computer and use it in GitHub Desktop.
jekyll category and post loop
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
| {% assign sorted_cats = site.categories | sort %} | |
| {% for category in sorted_cats %} | |
| <!-- <p><a href="posts/{{ category | first }}">{{ category | first }}</a></p> --> | |
| <p><a href="post.html">{{ category | first }}</a></p> | |
| {% for posts in category %} | |
| {% for post in posts %} | |
| <li><a href="{{site.baseurl}}{{ post.url }}">{{ post.title }}</a></li> | |
| {% endfor %} | |
| {% endfor %} | |
| {% endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment