Today I want to share with you how to add tags/categories to your awesome blog

Basically, I was following this guide


  • you need to create permalink in your _config.yml

    permalink: /tags/:title/

  • create a page tags.html



layout: page
permalink: /tags/
title: Tags


    {% for tag in site.tags %}
        {% capture tag_name %}{{ tag | first }}{% endcapture %}
        <div id="#{{ tag_name | slugize }}"></div>

        <a name="{{ tag_name | slugize }}" href="#{{ tag_name | slugize }}">#</a>
        <span>{{ tag_name }}</span>
        {% for post in site.tags[tag_name] %}
            <a href="{{ site.baseurl }}{{ post.url }}">{{post.title}}</a>
        {% endfor %}
    {% endfor %}

  • add tags key with array of values to your front matter to each of your post
  tags: - tag1 - tag2