Sha256: 31213ef2c370df9dcf5d3507561a5011d15b76937a72154b24d9f11ff0505018

Contents?: true

Size: 1.33 KB

Versions: 10

Compression:

Stored size: 1.33 KB

Contents

---
layout:   post
---

{% comment%}
Here we generate all the tags.
from: https://codinfox.github.io/dev/2015/03/06/use-tags-and-categories-in-your-jekyll-based-github-pages/
{% endcomment%}

{% assign rawtags = "" %}
{% for post in site.posts %}
{% assign ttags = post.tags | join:'|' | append:'|' %}
{% assign rawtags = rawtags | append:ttags %}
{% endfor %}

{% assign rawtags = rawtags | split:'|' | sort %}

{% assign tags = "" %}

{% for tag in rawtags %}
{% if tag != "" %}

{% if tags == "" %}
{% assign tags = tag | split:'|' %}
{% endif %}

{% unless tags contains tag %}
{% assign tags = tags | join:'|' | append:'|' | append:tag | split:'|' %}
{% endunless %}
{% endif %}
{% endfor %}

<div>
<p>
  {% for tag in tags %}
  <a href="#{{ tag | slugify }}" class=""> {{ tag }} </a> &nbsp;&nbsp;
  {% endfor %}
</p>

{% for tag in tags %}
<h3 id="{{ tag | slugify }}">{{ tag }}</h2>
  {% for post in site.posts %}
  {% if post.tags contains tag %}
  <ul class="actions">
    <li>
      <a class="button special" href="{{ post.url | relative_url}}">
        {{ post.title }}
        <small>{{ post.date | date_to_string }}</small>
      </a>
      {% for tag in post.tags %}
        <a class="button" href="{{ page.url | relative_url}}#{{ tag | slugify }}">{{ tag }}</a>
      {% endfor %}
    </li>
  </ul>
  {% endif %}
  {% endfor %}
{% endfor %}

</div>

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
fortyone-jekyll-theme-1.2.3 _layouts/alltags.html
fortyone-jekyll-theme-1.2.2 _layouts/alltags.html
fortyone-jekyll-theme-1.2.1 _layouts/alltags.html
fortyone-jekyll-theme-1.2.0 _layouts/alltags.html
fortyone-jekyll-theme-1.1.0 _layouts/alltags.html
fortyone-jekyll-theme-1.0.4 _layouts/alltags.html
fortyone-jekyll-theme-1.0.3 _layouts/alltags.html
fortyone-jekyll-theme-1.0.2 _layouts/alltags.html
fortyone-jekyll-theme-1.0.1 _layouts/alltags.html
fortyone-jekyll-theme-1.0.0 _layouts/alltags.html