Created
August 30, 2012 03:10
-
-
Save cyjake/3521950 to your computer and use it in GitHub Desktop.
[jekyll] [liquid] How to list posts of current page's category
This file contains 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 %} | |
{% if page.categories contains category[0] %} | |
<section> | |
<h3>{{ category | first | capitalize }}</h3> | |
{% assign posts = category[1] %} | |
</section> | |
{% endif %} | |
{% endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment