Created
November 27, 2013 01:05
-
-
Save e30chris/7669102 to your computer and use it in GitHub Desktop.
category_list.html aside for Octopress
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
<section class="panel panel-default"> | |
<div class="panel-heading"> | |
<h3 class="panel-title">Categories</h3> | |
</div> | |
<div class="list-group"> | |
{% for category in site.categories %} | |
{% capture category_url %}{{ site.category_dir }}/{{ category | first | slugize | downcase | replace:' ','-' | append:'/index.html'}}{% endcapture %} | |
<a class="list-group-item {% if category_url == page.url %}active{% endif %}" href="{{ root_url | append:'/' | append:category_url }}"> | |
<span class="badge">{{ category | last | size }}</span> | |
{{ category | first }} | |
</a> | |
{% endfor %} | |
</div> | |
</section> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment