Sha256: 8c01167793317d61802d26bd969632e738020d6641bf427688080cc4544af127

Contents?: true

Size: 1.28 KB

Versions: 5

Compression:

Stored size: 1.28 KB

Contents

<!-- See https://blog.lanyonm.org/articles/2013/11/21/alphabetize-jekyll-page-tags-pure-liquid.html -->
<!-- With added pipe to handle lack of sort_natural -->
{% capture site_tags %}{% for tag in site.tags %}{{ tag | first | downcase }}|{{ tag | first }}{% unless forloop.last %},{% endunless %}{% endfor %}{% endcapture %}
<!-- site_tags: {{ site_tags }} -->
{% assign tag_words = site_tags | split:',' | sort %}
<!-- tag_words: {{ tag_words }} -->

<div id="tags-page">
  <div class="tags-list">
    {% for tag_pair in tag_words %}
    {% assign tag = tag_pair | split:'|' | last %}
    <a href="#{{ tag | slugify }}" class="tag-link">
      <span class="tag-name">{{ tag }}</span>
      <span class="tag-count">{{ site.tags[tag] | size }}</span>
    </a>
    {% endfor %}
  </div>

  <hr/>

  <div class="posts-by-tag">
    {% for tag_pair in tag_words %}
    {% assign tag = tag_pair | split:'|' | last %}
    <h2 id="{{ tag | slugify }}">{{ tag }}</h2>
    <ul class="posts-list">
      {% for post in site.tags[tag] %}
        <li>
          <h3>
            <a href="{{ site.baseurl }}{{ post.url }}">
              {{ post.title }}
              <small>{{ post.date | date_to_string }}</small>
            </a>
          </h3>
        </li>
      {% endfor %}
    </ul>
    {% endfor %}
  </div>
</div>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
jekyll-theme-hydeout-3.2.0 _includes/tags-list.html
jekyll-theme-hydeout-3.1.3 _includes/tags-list.html
jekyll-theme-hydeout-3.1.2 _includes/tags-list.html
jekyll-theme-hydeout-3.1.1 _includes/tags-list.html
jekyll-theme-hydeout-3.1.0 _includes/tags-list.html