Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
31 lines (28 sloc) 1.36 KB
---
title: "Tags"
layout: "default"
---
{% capture site_tags %}{% for tag in site.tags %}{{ tag | first }}{% unless forloop.last %},{% endunless %}{% endfor %}{% endcapture %}
{% capture num_words %}
{{ site_tags | split:',' | size }}
{% endcapture %}
{% assign tag_words = site_tags | split:',' | sort %}
<div id="tags">
<div class="tag-box">
<div class="tag-spacer">&nbsp;</div>
{% for item in (0..num_words) %}{% unless forloop.last %}
{% capture this_word %}{{ tag_words[item] | strip_newlines }}{% endcapture %}
<div class="tag-container"><a class="btn btn-default btn-x" href="#{{ this_word | cgi_escape }}">{{ this_word }} <span>{{ site.tags[this_word].size }}</span></a></div>
{% endunless %}{% endfor %}
<div class="tag-spacer">&nbsp;</div>
</div>
{% for item in (0..num_words) %}{% unless forloop.last %}
{% capture this_word %}{{ tag_words[item] | strip_newlines }}{% endcapture %}
<h2 id="{{ this_word | cgi_escape }}">{{ this_word }}</h2>
<ul class="posts">
{% for post in site.tags[this_word] %}{% if post.title != null %}
<li itemscope><span class="entry-date"><time datetime="{{ post.date | date_to_xmlschema }}" itemprop="datePublished">{{ post.date | date: "%B %d, %Y" }}</time></span> &raquo; <a href="{{ post.url }}">{{ post.title }}</a></li>
{% endif %}{% endfor %}
</ul>
{% endunless %}{% endfor %}
</div>