Sha256: 91593e5c49d64c6688f3faf6961afa90915cc669dcf9a55cd441899f932fbf60

Contents?: true

Size: 1.3 KB

Versions: 2

Compression:

Stored size: 1.3 KB

Contents

{% case site.category_archive.type %}
  {% when "liquid" %}
    {% assign path_type = "#" %}
  {% when "jekyll-archives" %}
    {% assign path_type = nil %}
{% endcase %}

{% if site.category_archive.path %}
  {% comment %}
    <!-- Sort alphabetically regardless of case e.g. a B c d E -->
    <!-- modified from http://www.codeofclimber.ru/2015/sorting-site-tags-in-jekyll/ -->
  {% endcomment %}
  {% capture page_categories %}{% for category in page.categories %}{{ category | downcase }}#{{ category }}{% unless forloop.last %},{% endunless %}{% endfor %}{% endcapture %}
  {% assign category_hashes = page_categories | split: ',' | sort %}

  <p class="page__taxonomy">
    <strong><i class="fa fa-fw fa-folder-open" aria-hidden="true"></i> {{ site.data.ui-text[site.locale].categories_label | default: "Categories:" }} </strong>
    <span itemprop="keywords">
    {% for hash in category_hashes %}
      {% assign keyValue = hash | split: '#' %}
      {% capture category_word %}{{ keyValue[1] | strip_newlines }}{% endcapture %}
      <a href="{{ category_word | slugify | prepend: path_type | prepend: site.category_archive.path | absolute_url }}" class="page__taxonomy-item" rel="tag">{{ category_word }}</a>{% unless forloop.last %}<span class="sep">, </span>{% endunless %}
    {% endfor %}
    </span>
  </p>
{% endif %}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
minimal-mistakes-jekyll-4.8.1 _includes/category-list.html
minimal-mistakes-jekyll-4.7.0 _includes/category-list.html