Sha256: f601f1e22ba7e1a550c949dffc650f5f5acebd7b3d2fa0c203bc41fd753cd859
Contents?: true
Size: 1.34 KB
Versions: 12
Compression:
Stored size: 1.34 KB
Contents
{% comment %}<!-- The categories_list include is a listing helper for categories. Usage: 1) assign the 'categories_list' variable to a valid array of tags. 2) include JB/categories_list example: <ul> {% assign categories_list = site.categories %} {% include JB/categories_list %} </ul> Notes: Categories can be either a Hash of Category objects (hashes) or an Array of category-names (strings). The encapsulating 'if' statement checks whether categories_list is a Hash or Array. site.categories is a Hash while page.categories is an array. This helper can be seen in use at: ../_layouts/default.html -->{% endcomment %} {% if site.JB.categories_list.provider == "custom" %} {% include custom/categories_list %} {% else %} {% if categories_list.first[0] == null %} {% for category in categories_list %} <li><a href="{{ BASE_PATH }}{{ site.JB.categories_path }}{{ category }}"> {{ category | join: "/" }} <span class="badge">{{ site.categories[category].size }}</span> </a></li> {% endfor %} {% else %} {% for category in categories_list %} <li><a href="{{ BASE_PATH }}{{ site.JB.categories_path }}{{ category[0] }}"> {{ category[0] | join: "/" }} <span class="badge">{{ category[1].size }}</span> </a></li> {% endfor %} {% endif %} {% endif %} {% assign categories_list = nil %}
Version data entries
12 entries across 12 versions & 1 rubygems