Generate pages based on tags

Hi, I have a website full of articles. Each articles have tags given by the user. It’s hosted by github pages.

I want jekyll to read each of the tags, and categorize the pages. It should list all the tags as hyperlink to /tags/ directory. This can be done by the following code:

{% assign articles = site.posts %}
{% assign allTags = '' %}

{% for article in articles %}
  {% for tag in article.tags %}
    {% assign allTags = allTags | append: ' ' | append: tag %}
  {% endfor %}
{% endfor %}

{% assign sortedTags = allTags | split: ' ' | uniq | sort %}

<div class="main-content">
    {% for tag in sortedTags %}
      <a href="{{ tag | downcase }}">{{ tag }}</a>
    {% endfor %}

Now that it generates the link, I want Jekyll to make real pages that addresses to the hyperlinks.

In other words, say I have tag “Ruby”, jekyll will build the /ruby/ directory. Where it will list all the articles that has the “Ruby” tags, case insensitive.

Is that possible? I can use any plugins that is supported by github pages…

Might this

help you along?