# Generate pages based on tags

**URL:** <https://talk.jekyllrb.com/t/generate-pages-based-on-tags/6453>\
**Category:** Help\
**Created:** [September 20, 2021, 3:29pm UTC](https://talk.jekyllrb.com/t/generate-pages-based-on-tags/6453 "2021-09-20T15:29:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Souravgoswami](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/souravgoswami/32/2980_2.png) [@Souravgoswami](https://talk.jekyllrb.com/u/Souravgoswami)\
**Post date:** [September 20, 2021, 3:29pm UTC](https://talk.jekyllrb.com/t/generate-pages-based-on-tags/6453/1 "2021-09-20T15:29:26Z")

</div>

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:

```auto
{% 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>
      <br>
    {% endfor %}
</div>

```

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…

---

<div class="post-metadata">

**Author:** ![michaelbach](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/michaelbach/32/2151_2.png) [@michaelbach](https://talk.jekyllrb.com/u/michaelbach)\
**Post date:** [September 21, 2021, 5:15am UTC](https://talk.jekyllrb.com/t/generate-pages-based-on-tags/6453/2 "2021-09-21T05:15:32Z")

</div>

Might this

> **[GitHub - pattex/jekyll-tagging: Jekyll plugin to automatically generate a tag...](https://github.com/pattex/jekyll-tagging)**
>
> Jekyll plugin to automatically generate a tag cloud and tag pages. - GitHub - pattex/jekyll-tagging: Jekyll plugin to automatically generate a tag cloud and tag pages.

help you along?
