layout: post
{{ content }}
{% comment%} stackoverflow.com/a/28105741
Here we generate all the tags. from: codinfox.github.io/dev/2015/03/06/use-tags-and-categories-in-your-jekyll-based-github-pages/ {% endcomment%}
{% assign rawtags = “” %}
{% assign collection= site.collections | where: “label”, page.collection | first %} {% assign items = collection.docs | sort: 'order' %}
{% for post in items %} {% 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 %}
<div> <p>
{% for tag in tags %} <a href="#{{ tag | slugify }}" class=""> {{ tag }} </a> {% endfor %}
</p>
{% for tag in tags %} <h3 id=“{{ tag | slugify }}”>{{ tag }}</h2>
{% for post in items %} {% if post.categories contains tag %} <ul class="actions"> <li> <a class="button special" href="{{ post.url | absolute_url }}"> {{ post.title }} </a> {% for tag in post.categories %} <a class="button" href="{{ page.url | absolute_url }}#{{ tag | slugify }}">{{ tag }}</a> {% endfor %} </li> </ul> {% endif %} {% endfor %}
{% endfor %}
</div>