-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathseries.html
More file actions
33 lines (30 loc) · 835 Bytes
/
series.html
File metadata and controls
33 lines (30 loc) · 835 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
{% if page.series %}
{% assign count = '0' %}
{% assign idx = '0' %}
{% for post in site.posts reversed %}
{% if post.series == page.series %}
{% capture count %}{{ count | plus: '1' }}{% endcapture %}
{% if post.url == page.url %}
{% capture idx %}{{count}}{% endcapture %}
{% endif %}
{% endif %}
{% endfor %}
<div class="panel seriesNote">
<p>This article is <strong>Part {{ idx }}</strong> in a <strong>{{ count }}-Part</strong> Series.</p>
<ul>
{% assign count = '0' %}
{% for post in site.posts reversed %}
{% if post.series == page.series %}
{% capture count %}{{ count | plus: '1' }}{% endcapture %}
<li>Part {{ count }} -
{% if page.url == post.url %}
This Article
{% else %}
<a href="{{post.url}}">{{post.title}}</a>
{% endif %}
</li>
{% endif %}
{% endfor %}
</ul>
</div>
{% endif %}