Add tags to Jekyll static website



We can put tags in posts, e.g. adding “tags: jekyll” in the header of each post. There are two ways to show tags on a static Jekyll website without any plugin.

  1. To put all tags in a html file, create a link on the main page to link this tag page. This page can be created based on the reference.

    http://stackoverflow.com/questions/1408824/an-easy-way-to-support-tags-in-a-jekyll-blog

  2. Creating sperate tag pages includes three steps. The first two steps can follow the reference. The third step is as the below codes in “_layouts/post.html”.

      <h3>Tags:
      {% for tag in page.tags %}
      <a class="page-link" href="/tags/"></a>&nbsp;
      {% endfor %}
    

    Reference:http://christianspecht.de/2014/10/25/separate-pages-per-tag-category-with-jekyll-without-plugins/