layout: page
{% capture site_tags %}{% for tag in site.tags %}{{ tag | first }}{% unless forloop.last %},{% endunless %}{% endfor %}{% endcapture %} {% assign tag_words = site_tags | split:',' | sort %}
<!– cycles through tag list and creates subheader for each tag name –> {% for item in (0..site.tags.size) %}
{% unless forloop.last %} {% capture this_word %}{{ tag_words[item] | strip_newlines }}{% endcapture %} <h2 id="{{ this_word | cgi_escape }}" class="tag-title"> #{{ this_word }} </h2> <!-- lists all posts corresponding to specific tag --> {% for post in site.tags[this_word] %} {% if post.title != null %} <div class="tagged-post"> <h3 class="title"> <a href="{{ post.url | relative_url }}"> {{ post.title }} </a> </h3> <div class="meta"> {{ post.date | date: "%B %-d, %Y" }} </div> </div> {% endif %} {% endfor %} {% endunless %}
{% endfor %}