Update for new Hugo versions

Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
This commit is contained in:
2026-05-12 19:43:12 -07:00
parent 0fa8fb35ec
commit 20217e0b97
51 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
{{- $scratch := .scratch -}}
{{- $scratch.Set "pages" slice -}}
{{- $tmpScratch := newScratch -}}
{{- range $post := (where (where site.Pages.ByDate.Reverse "Section" "blog") ".Kind" "!=" "section") -}}
{{- $term := index ($post.GetTerms "series") 0 -}}
{{- if (and $term (not ($term.Param "donotunique"))) -}}
{{- if not ($tmpScratch.Get $term.Permalink) -}}
{{- $tmpScratch.Set $term.Permalink true -}}
{{- $scratch.Add "pages" $post -}}
{{- end -}}
{{- else -}}
{{- $scratch.Add "pages" $post -}}
{{- end -}}
{{- end -}}