Tag-specific pages
This commit is contained in:
parent
dfbbf9888f
commit
de779761c6
2 changed files with 24 additions and 37 deletions
29
tag/index.html
Normal file
29
tag/index.html
Normal file
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
layout: page
|
||||
title: Tag Archive
|
||||
description: "An archive of posts sorted by tag."
|
||||
comments: false
|
||||
breadcrumb: true
|
||||
---
|
||||
|
||||
{% capture site_tags %}{% for tag in site.tags %}{{ tag | first }}{% unless forloop.last %},{% endunless %}{% endfor %}{% endcapture %}
|
||||
{% assign tags_list = site_tags | split:',' | sort %}
|
||||
|
||||
<ul class="small-block-grid-2 medium-block-grid-3 large-block-grid-5">
|
||||
{% for item in (0..site.tags.size) %}{% unless forloop.last %}
|
||||
{% capture this_word %}{{ tags_list[item] | strip_newlines }}{% endcapture %}
|
||||
<li><a href="{{ site.url }}/tag/{{ this_word | slugify }}/" class="tag"><span class="term">{{ this_word }}</span> (<span class="count">{{ site.tags[this_word].size }})</span></a></li>
|
||||
{% endunless %}{% endfor %}
|
||||
</ul>
|
||||
|
||||
<!--{% for item in (0..site.tags.size) %}{% unless forloop.last %}
|
||||
{% capture this_word %}{{ tags_list[item] | strip_newlines }}{% endcapture %}
|
||||
<article>
|
||||
<h2 id="{{ this_word }}" class="tag-heading">{{ this_word }}</h2>
|
||||
<ul>
|
||||
{% for post in site.tags[this_word] %}{% if post.title != null %}
|
||||
<li class="entry-title"><a href="{{ site.url }}{{ post.url }}" title="{{ post.title }}">{{ post.title }}</a></li>
|
||||
{% endif %}{% endfor %}
|
||||
</ul>
|
||||
</article><!-- /.hentry -->
|
||||
<!-- {% endunless %}{% endfor %}-->
|
Reference in a new issue