pages/tags.html

38 lines
1,015 B
HTML
Executable file

---
layout: default
nocard: true
title: All Projects
---
{% assign rawtags = "" %}
{% for post in site.posts %}
{% assign ttags = post.tags | 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 %}
<div class="section">
{% for tag in tags %}
<ul class="collection with-header">
<li id="{{ tag | slugify }}" class="collection-header">{{ tag }}</li>
{% for post in site.posts %}
{% if post.tags contains tag %}
<a href="{{ post.url }}" class="collection-item">
{{ post.title }}
</a>
{% endif %}
{% endfor %}
</ul>
{% endfor %}
</div>