-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtags.html
More file actions
executable file
·39 lines (37 loc) · 1.2 KB
/
tags.html
File metadata and controls
executable file
·39 lines (37 loc) · 1.2 KB
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
35
36
37
38
39
---
layout: page
title: Tag Index
permalink: /tags/index.html
description: "An archive of posts sorted by tag."
---
{% capture site_tags %}{% for tag in site.tags %}{{ tag | first }}{% unless forloop.last %},{% endunless %}{% endfor %}{% endcapture %}
{% assign tag_words = site_tags | split:',' | sort %}
<ul class="tag-box inline">
{% assign tags_list = tag_words %}
{% if tags_list.first[0] == null %}
{% for tag in tags_list %}
{% if site.tags[tag].size %}
<li><a href="#{{ tag }}">{{ tag }} <span>{{ site.tags[tag].size }}</span></a></li>
{% endif %}
{% endfor %}
{% else %}
{% for tag in tags_list %}
<li><a href="#{{ tag[0] }}">{{ tag[0] }} <span>{{ tag[1].size }}</span></a></li>
{% endfor %}
{% endif %}
</ul>
{% for tag in tag_words %}
<h2 id="{{ tag }}">{{ tag }}</h2>
<ul class="post-list">
{% assign pages_list = site.tags[tag] %}
{% for post in pages_list %}
{% if post.title != null %}
{% if group == null or group == post.group %}
{% include post-listing.html %}
{% endif %}
{% endif %}
{% endfor %}
{% assign pages_list = nil %}
{% assign group = nil %}
</ul>
{% endfor %}