-
Notifications
You must be signed in to change notification settings - Fork 0
/
categories.html
46 lines (40 loc) · 1.04 KB
/
categories.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
35
36
37
38
39
40
41
42
43
44
---
layout: page
title: Categories
---
{% assign rawtags = "" %}
{% for post in site.artifacts %}
{% assign ttags = post.categories | join:'|' | append:'|' %}
{% assign rawtags = rawtags | append:ttags %}
{% endfor %}
{% assign rawtags = rawtags | split:'|' | sort %}
{% assign tags = "" %}
{% for tag in rawtags %}
{% if tag != "" %}
{% if tags == "" %}
{% assign tags = tag | split:'|' %}
{% endif %}
{% unless tags contains tag %}
{% assign tags = tags | join:'|' | append:'|' | append:tag | split:'|' %}
{% endunless %}
{% endif %}
{% endfor %}
{% for tag in tags %}
<button><a href="tags.html#{{ tag | slugify }}"> {{ tag }} </a></button>
{% endfor %}
<br/><br/>
<h1>List</h1>
{% for tag in tags %}
<h2 id="{{ tag | slugify }}">{{ tag }}</h2>
<ul>
{% for artifact in site.artifacts %}
{% if artifact.categories contains tag %}
<li><h3>
<a href="{{ site.baseurl }}{{ artifact.url }}">
{{ artifact.title }}
</a></h3>
</li>
{% endif %}
{% endfor %}
</ul>
{% endfor %}