--- layout: post --- {{ content }} {% comment%} https://stackoverflow.com/a/28105741 Here we generate all the tags. from: https://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 %}

{% for tag in tags %} {{ tag }}    {% endfor %}

{% for tag in tags %}

{{ tag }}

{% for post in items %} {% if post.categories contains tag %} {% endif %} {% endfor %} {% endfor %}