From 0c15555dc1e1ed3cb9419e4206ab719cfb735016 Mon Sep 17 00:00:00 2001 From: paspo Date: Wed, 30 Oct 2024 09:21:25 +0000 Subject: [PATCH] fix edizioni linuxday (#323) Reviewed-on: https://git.libreschool.org/BgLUG/bglug.it/pulls/323 Co-authored-by: paspo Co-committed-by: paspo --- layouts/partials/sidebar/linuxday-editions.html | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/layouts/partials/sidebar/linuxday-editions.html b/layouts/partials/sidebar/linuxday-editions.html index daa9493..a65b199 100644 --- a/layouts/partials/sidebar/linuxday-editions.html +++ b/layouts/partials/sidebar/linuxday-editions.html @@ -1,20 +1,24 @@ {{ $hiddenTags := slice "linuxday-featured" }} -{{ $years := where .Site.Taxonomies.grouping ".Page.Section" .Section }} +{{ $years1 := where .Site.Taxonomies.grouping ".Page.Section" .Section }} +{{ $years1 := $years1.Alphabetical.Reverse }} +{{ $years := slice }} +{{ range $years1 }} + {{ if and (strings.HasPrefix .Name "linuxday-") (not (in $hiddenTags .Name)) }} + {{ $years = $years | append . }} + {{ end }} +{{ end }} {{- if gt (len $years) 0 }}

{{ T "editions" }}

{{ end }}