-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcategories.html
41 lines (38 loc) · 1.19 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
---
layout: post-index
permalink: /categories/
title: Category Archive
description: "An archive of posts sorted by category."
image:
feature: background.jpg
---
<ul class="entry-meta inline-list">
{% assign categories_list = site.categories %}
{% if categories_list.first[0] == null %}
{% for cat in categories_list %}
<li><a href="#{{ cat }}" class="cat">{{ cat }} <span>{{ site.categories[cat].size }}</span></a></li>
{% endfor %}
{% else %}
{% for cate in categories_list %}
<li><a href="#{{ cate[0] }}" class="cat">{{ cat[0] }} <span>{{ cat[1].size }}</span></a></li>
{% endfor %}
{% endif %}
{% assign tags_list = nil %}
</ul>
{% for cat in site.categories %}
<article>
<h2 id="{{ cat[0] }}">{{ cat[0] }}</h2>
<ul>
{% assign pages_list = cat[1] %}
{% for post in pages_list %}
{% if post.title != null %}
{% if group == null or group == post.group %}
<li class="entry-title"><a href="{{ site.url }}{{ post.url }}" title="{{ post.title }}">{{ post.title }}</a></li>
{% endif %}
{% endif %}
{% endfor %}
{% assign pages_list = nil %}
{% assign group = nil %}
</ul>
</article><!-- /.hentry -->
{% endfor %}