Last active
December 14, 2015 02:45
-
-
Save bradonomics/3cce65356f85bb5cb3bb to your computer and use it in GitHub Desktop.
Jekyll Categories on GitHub Pages (multiple categories) (_includes/post-categories.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
| {% if post %} | |
| {% assign categories = post.categories %} | |
| {% else %} | |
| {% assign categories = page.categories %} | |
| {% endif %} | |
| {% for category in categories %} | |
| <span class="entry-categories"><a href="{{ site.url }}/{{ page.category-url }}/" rel="category">{{ page.category }}</a></span>{% unless forloop.last %},{% endunless %} | |
| {% endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment