Implement collapsing consecutive posts in a series

Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
This commit is contained in:
2024-11-25 19:15:07 -08:00
parent dde3fb61ae
commit 8b8d3c7fd0
5 changed files with 43 additions and 2 deletions

View File

@@ -2,9 +2,10 @@
{{ .Content }}
{{ i18n "recentPosts" }}:
{{ partial "uniquebyseries.html" (dict "scratch" .Scratch) }}
<ul class="post-list">
{{ range first 10 (where (where .Site.Pages.ByDate.Reverse "Section" "blog") ".Kind" "!=" "section") }}
{{ partial "post.html" (dict "page" .) }}
{{ range first 10 (.Scratch.Get "pages") }}
{{ partial "post.html" (dict "page" . "linkSeries" true) }}
{{ end }}
</ul>