From e7246a2fdfc85c6adb30db32d15ca642c83ba8e9 Mon Sep 17 00:00:00 2001 From: David Karlsson <35727626+dvdksn@users.noreply.github.com> Date: Wed, 18 Dec 2024 13:06:50 +0100 Subject: [PATCH] hugo: fix 'reverse' option for re-ordering sidebar entries Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> --- hugo_stats.json | 7 +++++-- layouts/partials/sidebar/sections.html | 3 +-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/hugo_stats.json b/hugo_stats.json index 0cc860b0665..4cb719a37c9 100644 --- a/hugo_stats.json +++ b/hugo_stats.json @@ -42,6 +42,7 @@ "Docker-Desktop", "Docker-Hub", "Docker-Scout-Dashboard", + "Docker-plan", "Download", "Entra-ID", "Entra-ID-SAML-2.0", @@ -68,6 +69,8 @@ "JavaScript", "Jenkins", "Latest", + "Legacy-Docker-plan", + "Legacy-Docker-plans", "Linux", "Local-or-Hub-storage", "MDM", @@ -138,7 +141,6 @@ "aspect-video", "bake-action", "bg-amber-light", - "bg-amber-light-200", "bg-background-light", "bg-black/50", "bg-black/70", @@ -191,7 +193,6 @@ "containerd-image-store", "cursor-pointer", "dark:bg-amber-dark", - "dark:bg-amber-dark-200", "dark:bg-background-dark", "dark:bg-blue-dark", "dark:bg-blue-dark-400", @@ -261,6 +262,7 @@ "flex-col", "flex-col-reverse", "flex-grow", + "flex-grow-0", "flex-none", "flex-shrink", "flex-wrap", @@ -342,6 +344,7 @@ "lg:gap-8", "lg:grid-cols-2", "lg:grid-cols-3", + "lg:grid-cols-4", "lg:hidden", "lg:no-underline", "lg:pb-2", diff --git a/layouts/partials/sidebar/sections.html b/layouts/partials/sidebar/sections.html index 988c4557eee..d166b61e21a 100644 --- a/layouts/partials/sidebar/sections.html +++ b/layouts/partials/sidebar/sections.html @@ -8,11 +8,10 @@ {{ define "renderChildren" }} - {{- $pages := .Pages }} + {{- $pages := where .Pages "Params.sitemap" "ne" "false" }} {{- if .Params.sidebar.reverse }} {{ $pages = .Pages.Reverse }} {{- end }} - {{- $pages = where .Pages "Params.sitemap" "ne" "false" }} {{- $ungrouped := where $pages "Params.sidebar.group" "==" nil }} {{- range $ungrouped }} {{- if .IsSection }}