You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

31 lines
1.2 KiB

---
layout: default
title: Categories
permalink: /categories/
header_display: true
---
<!--TODO: Find a fix to tags with spaces-->
<ul class="tag_box inline">
{% if site.categories.first[0] != null %}{% comment %} If tags exist {% endcomment %}
{% for category in site.categories %}{% comment %} add an element like the following for each tag item {% endcomment %}
<li><a href="#{{ category[0] }}"><span class="label label-success">{{ category[0] }}</span> {% comment %} This is just the tag name {% endcomment %}
<span>{{ category[1].size }}</span>{% comment %} This counts the number of posts in a given tag {% endcomment %}
</a></li>
{% endfor %}
{% endif %}
</ul>
{% for category in site.categories %}
<h1 id="{{ category[0] }}">{{ category[0] }}</h1>
<ul>
{% for post in category[1] %}
{% if post.title != null %}
{% if page.url == post.url %}
<li class="active"><a href="#" class="active">{{post.title}}</a></li>
{% else %}
<li>{{ post.date | date: "%B %e, %Y" }} &raquo; <a href="{{post.url}}">{{post.title}}</a></li>
{% endif %}
{% endif %}
{% endfor %}
</ul>
{% endfor %}