2 The categories_list include is a listing helper for categories.
4 1) assign the 'categories_list' variable to a valid array of tags.
5 2) include JB/categories_list
8 {% assign categories_list = site.categories %}
9 {% include JB/categories_list %}
13 Categories can be either a Hash of Category objects (hashes) or an Array of category-names (strings).
14 The encapsulating 'if' statement checks whether categories_list is a Hash or Array.
15 site.categories is a Hash while page.categories is an array.
17 This helper can be seen in use at: ../_layouts/default.html
20 {% if site.JB.categories_list.provider == "custom" %}
21 {% include custom/categories_list %}
23 {% if categories_list.first[0] == null %}
24 {% for category in categories_list %}
25 <li><a href="{{ BASE_PATH }}{{ site.JB.categories_path }}#{{ category }}-ref">
26 {{ category | join: "/" }} <span>{{ site.categories[category].size }}</span>
30 {% for category in categories_list %}
31 <li><a href="{{ BASE_PATH }}{{ site.JB.categories_path }}#{{ category[0] }}-ref">
32 {{ category[0] | join: "/" }} <span>{{ category[1].size }}</span>
37 {% assign categories_list = nil %}