-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathseries.html
37 lines (33 loc) · 1 KB
/
series.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
---
layout: default
title: Post Series
---
{% assign series = "" %}
{% for post in site.posts %}
{% if post.series != nil %}
{% if series == "" %}
{% assign series = post.series %}
{% endif %}
{% unless series contains post.series %}
{% assign series = series | append:'|' | append: post.series %}
{% endunless %}
{% endif %}
{% endfor %}
{% assign series = series | split:'|' %}
<div class="home">
<section>
<p>All series - from latest back to the first.</p>
{% for serie in series %}
<h3 class="series-title" id="{{ serie | slugify }}">{{ serie }}</h3>
<ol class="series-list">
{% for post in site.posts reversed %}
{%- if post.series == serie %}
<li>
<a href="{{ post.url | prepend: site.baseurl | prepend: site.url }}">{{ post.title }}</a> <time datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date: "%b %d, %Y" }}</time>
</li>
{% endif %}
{%- endfor %}
</ol>
{% endfor %}
</section>
</div>