forked from ReproducibiliTea-org/reproducibiliTea
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcategories.html
More file actions
41 lines (37 loc) · 986 Bytes
/
categories.html
File metadata and controls
41 lines (37 loc) · 986 Bytes
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
---
layout: default
---
{% comment %}
=======================
List all the categories.
=======================
{% endcomment %}
<h1>Categories:</h1>
{% for cat in site.categories %}
<a href="#{{ cat[0] | slugify }}">[{{ cat[0] }}]</a>
{% endfor %}
{% comment %}
=======================
List all posts with a certain category.
=======================
{% endcomment %}
<h1>Posts by category:</h1>
{% for cat in site.categories %}
<h2 id="{{ cat[0] | slugify }}">{{ cat[0] }}</h2>
<ul>
{% for post in cat[1] %}
<li>
<h3>
<a href="{{ post.url }}">
{{ post.title }} |
</a>
<small>{{ post.date | date_to_string }}
{% if post.categories %}
[{% for x in post.categories %}<a href="/categories.html#{{ x }}">{{x}}</a>{% unless forloop.first == true %}, {% endunless %}{% endfor %}]
{% endif %}
</small>
</h3>
</li>
{% endfor %}
</ul>
{% endfor %}