Created
June 9, 2014 16:57
-
-
Save sskylar/ec189a3ba310b1507a1e to your computer and use it in GitHub Desktop.
Group posts by tag and sort alphabetically in Siteleaf
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 tag in taxonomy['tags'] %} | |
<h1>{{tag}}</h1> | |
<ul> | |
{% assign sorted_posts = tag.posts.all | sort:'title' %} | |
{% for post in sorted_posts %} | |
<li>{{post.title}}</li> | |
{% endfor %} | |
</ul> | |
{% endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note: Change
taxonomy['tags']
tosite.pages['blog'].taxonomy['tags']
for tags outside of current page.