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.

  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”.

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