beautifulSA-jekyll/tags.html

32 lines
1.1 KiB
HTML
Raw Normal View History

---
layout: page
title: 'Tag Index'
---
{%- capture site_tags -%}
{%- for tag in site.tags -%}
{{- tag | first -}}{%- unless forloop.last -%},{%- endunless -%}
{%- endfor -%}
{%- endcapture -%}
{%- assign tags_list = site_tags | split:',' | sort -%}
{%- for tag in tags_list -%}
<a href="#{{- tag -}}" class="btn btn-primary tag-btn"><i class="fa fa-tag" aria-hidden="true"></i>&nbsp;{{- tag -}}</a>
{%- endfor -%}
{%- for tag in tags_list -%}
<h3 id="{{- tag -}}"><i class="fa fa-tag" aria-hidden="true"></i>&nbsp;{{- tag -}}</h3>
<ul class="post-list">
{%- for post in site.tags[tag] -%}
<li>
<i class="fa fa-calendar-check-o" aria-hidden="true"></i>&nbsp;
<span class="entry-date">
<time datetime="{{- post.date | date_to_xmlschema -}}">{{- post.date | date: "%B %d, %Y" -}}</time>
</span>
<i class="fa fa-newspaper-o" aria-hidden="true"></i>&nbsp;
<a href="{{- site.url -}}{{- post.url -}}">{{- post.title -}}</a>
</li>
{%- endfor -%}
</ul>
{%- endfor -%}