Here is a solution with alphabetically sorted tags on one page .
It uses only Liquid, which means it works on GitHub pages:
{% capture tags %} {% for tag in site.tags %} {{ tag[0] }} {% endfor %} {% endcapture %} {% assign sortedtags = tags | split:' ' | sort %} {% for tag in sortedtags %} <h3 id="{{ tag }}">{{ tag }}</h3> <ul> {% for post in site.tags[tag] %} <li><a href="{{ post.url }}">{{ post.title }}</a></li> {% endfor %} </ul> {% endfor %}
You can see it in action here .
EDIT:
It is also possible to generate a separate page for each tag without plugins (which will work on GitHub pages).
I have a more detailed explanation on my blog:
Separate pages for each tag / category using Jekyll (without plugins)
First you need a new layout file:
/_layouts/tagpage.html :
--- layout: default --- <h1>{{ page.tag }}</h1> <ul> {% for post in site.tags[page.tag] %} <li> {{ post.date | date: "%B %d, %Y" }}: <a href="{{ post.url }}">{{ post.title }}</a> </li> {% endfor %} </ul>
Using this layout file, you can add a new tag page by adding a new file with two lines of the front YAML array.
Here is an example jekyll tag:
/tags/jekyll/index.html :
The only drawback of this approach is that every time you use a new tag for the first time, you should remember to create a new two-line file for it.
To generate a root index file (i.e. a tag list that links to /tags/jekyll/index.html , etc.), you can use a similar solution similar to the one written on top of this answer, where I generate one page with alpha-sorted tags:
{% capture tags %} {% for tag in site.tags %} {{ tag[0] }} {% endfor %} {% endcapture %} {% assign sortedtags = tags | split:' ' | sort %} {% for tag in sortedtags %} <a href="/tags/{{ tag }}/">{{ tag }}</a><br> {% endfor %}
This will result in a list of such links:
<ul> <li><a href="/tags/.net/">.net</a></li> <li><a href="/tags/authentication/">authentication</a></li> <li><a href="/tags/backup/">backup</a></li> </ul>
Please note that this solution uses a space for tagging, so it doesnβt work when your tags contain spaces and Evgeny Brikmanβs comment also applies here.