forked from daattali/beautiful-jekyll
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tags.html
34 lines (31 loc) · 1.11 KB
/
tags.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
---
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> {{- tag -}} ({{site.tags[tag].size}})</a>
{%- endfor -%}
<div id="full-tags-list">
{%- for tag in tags_list -%}
<h2 id="{{- tag -}}" class="linked-section">
<i class="fa fa-tag" aria-hidden="true"></i>
{{- tag -}} ({{site.tags[tag].size}})
</h2>
<div class="post-list">
{%- for post in site.tags[tag] -%}
<div class="tag-entry">
<a href="{{- site.url -}}{{- post.url -}}">{{- post.title -}}</a>
<div class="entry-date">
<time datetime="{{- post.date | date_to_xmlschema -}}">{{- post.date | date: "%B %d, %Y" -}}</time>
</div>
</div>
{%- endfor -%}
</div>
{%- endfor -%}
</div>