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.

32 lines
1.2 KiB

10 years ago
---
layout: default
title: Tags
permalink: /tags/
header_display: true
10 years ago
---
<!--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 tag in site.categories %}{% comment %} add an element like the following for each tag item {% endcomment %}
<li><a href="#{{ tag[0] }}"><span class="label label-success">{{ tag[0] }}</span> {% comment %} This is just the tag name {% endcomment %}
<span>{{ tag[1].size }}</span>{% comment %} This counts the number of posts in a given tag {% endcomment %}
</a></li>
{% endfor %}
{% endif %}
</ul>
{% for tag in site.categories %}
<h1 id="{{ tag[0] }}">{{ tag[0] }}</h1>
<ul>
{% for tag_post in tag[1] %}
{% if tag_post.title != null %}
{% if page.url == tag_post.url %}
<li class="active"><a href="#" class="active">{{tag_post.title}}</a></li>
{% else %}
<li>{{ tag_post.date | date: "%B %e, %Y" }} &raquo; <a href="{{tag_post.url}}">{{tag_post.title}}</a></li>
{% endif %}
{% endif %}
{% endfor %}
</ul>
{% endfor %}