To create a tag archive page on Jekyll I added a
tag.html file in my
_layouts directory. This file is responsible for listing posts with the given tag. Here's how it works.
First, it gets the selected tag from the page title slugified, then it loops through the site posts and show only those who contain the selected tag.
To use the
tag.html template is necessary to create a markdown file for each tag. I created
html5.md and placed it in the
tag folder, it looks like this.
Where title is the tag that will be filtered and layout is the
Jekyll will create an HTML file for each tag defined this way. Finally to link the tags from my page footer I did this.