initial commit of series

This commit is contained in:
Nuno Coração
2022-10-17 19:43:29 +01:00
parent 68e740b260
commit b54ae4a6a0
8 changed files with 41 additions and 10 deletions
+20
View File
@@ -0,0 +1,20 @@
{{ if .Params.series }}
<div>
<h4>This article is part of a series.</h4>
<ul class="list-group">
{{ range $post := sort (index .Site.Taxonomies.series (index .Params.series 0 | urlize)) "Params.series_order" }}
{{ if eq $post.Permalink $.Page.Permalink }}
<li class="list-group-item active">
Part {{ $post.Params.series_order }}: This Article
</li>
{{ else }}
<li class="list-group-item">
<a href="{{$post.Permalink}}">
Part {{ $post.Params.series_order }}: {{ $post.Params.title}}
</a>
</li>
{{end}}
{{end}}
</ul>
</div>
{{end}}