-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcategories.html
42 lines (39 loc) · 1.26 KB
/
categories.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---
layout: base
title: Categories
---
{% assign categories_path = '/categories.html' %}
<h1>Liste des catégories du blog</h1>
<ul class="tag_box inline">
{% if site.categories.first[0] == null %}
{% for category in site.categories %}
<li><a href="{{ categories_path }}#{{ category }}-ref">
{{ category | join: "/" | capitalize }} <span>({{ site.categories[category].size }} posts)</span>
</a></li>
{% endfor %}
{% else %}
{% for category in site.categories %}
<li><a href="{{ categories_path }}#{{ category[0] }}-ref">
{{ category[0] | join: "/" | capitalize}} <span>({{ category[1].size }} posts)</span>
</a></li>
{% endfor %}
{% endif %}
</ul>
<h1>Tous les articles par catégories</h1>
{% for category in site.categories %}
<h2 id="{{ category[0] }}-ref">{{ category[0] | join: "/" | capitalize }}</h2>
<ul>
{% assign pages_list = category[1] %}
{% for node in pages_list %}
{% if node.title != null %}
{% if group == null or group == node.group %}
{% if page.url == node.url %}
<li class="active"><a href="{{node.url}}" class="active">{{node.title}}</a></li>
{% else %}
<li><a href="{{node.url}}">{{node.title}}</a></li>
{% endif %}
{% endif %}
{% endif %}
{% endfor %}
</ul>
{% endfor %}