Skip to content

Commit

Permalink
Sort posts in series by date ascending.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tekki committed Mar 11, 2023
1 parent 1651a2d commit e583b4a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion layouts/partials/related.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{$related := where .Site.RegularPages ".Params.series" "eq" .Params.series }}
<h2 class="post_related">{{ T "series_posts" }}</h2>
<ul>
{{ range $related }}
{{ range sort $related "Date" }}
<li><a href="{{ .Permalink }}" class="nav-link" title="{{ .Title }}">{{ .Title }}</a></li>
{{ end }}
</ul>
2 changes: 1 addition & 1 deletion layouts/partials/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ <h2 class="mt-4">Disclaimer</h2>
{{$related := where .Site.RegularPages ".Params.series" "eq" .Params.series }}
<h2 class="mt-4">{{ T "series_posts" }}</h2>
<ul>
{{ range $related }}
{{ range sort $related "Date" }}
<li>
<a href="{{ .Permalink }}" class="nav-link" title="{{ .Title }}">{{ .Title | markdownify }}</a>
</li>
Expand Down

0 comments on commit e583b4a

Please sign in to comment.