From 0d387fe4946ca053718dce068b10cda63b900e0f Mon Sep 17 00:00:00 2001 From: Christopher Haar Date: Tue, 27 Oct 2026 09:41:56 +0100 Subject: [PATCH] feat(recipes): Support the renamed accelerators facet from modelplane#556 Signed-off-by: Christopher Haar --- themes/geekboot/layouts/partials/icons.html | 9 +++++++++ themes/geekboot/layouts/partials/recipe-row.html | 3 ++- .../layouts/shortcodes/validated-deployments.html | 9 ++++++--- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/themes/geekboot/layouts/partials/icons.html b/themes/geekboot/layouts/partials/icons.html index b0a346f..503130e 100644 --- a/themes/geekboot/layouts/partials/icons.html +++ b/themes/geekboot/layouts/partials/icons.html @@ -55,6 +55,9 @@ + + + {{/* Brand marks for the recipe catalog (simple-icons, CC0). */}} @@ -68,6 +71,9 @@ + + + @@ -83,6 +89,9 @@ + + + diff --git a/themes/geekboot/layouts/partials/recipe-row.html b/themes/geekboot/layouts/partials/recipe-row.html index 22cf1da..b21372c 100644 --- a/themes/geekboot/layouts/partials/recipe-row.html +++ b/themes/geekboot/layouts/partials/recipe-row.html @@ -14,7 +14,8 @@ {{ range .Params.accelerators }} {{ $name := . }} {{ $mem := "" }} - {{ range hugo.Data.recipes.gpus }}{{ if eq .name $name }}{{ $mem = .mem }}{{ end }}{{ end }} + {{/* `accelerators` from 0.6 on, `gpus` on older release branches. */}} + {{ range hugo.Data.recipes.accelerators | default hugo.Data.recipes.gpus }}{{ if eq .name $name }}{{ $mem = .mem }}{{ end }}{{ end }} {{ $name }}{{ with $mem }} {{ . }}{{ end }} {{ end }} {{ range .Params.engines }}{{ . }}{{ end }} diff --git a/themes/geekboot/layouts/shortcodes/validated-deployments.html b/themes/geekboot/layouts/shortcodes/validated-deployments.html index 748fc6a..83f9f3c 100644 --- a/themes/geekboot/layouts/shortcodes/validated-deployments.html +++ b/themes/geekboot/layouts/shortcodes/validated-deployments.html @@ -34,10 +34,13 @@
-
GPU
+ {{/* 0.6 renamed data `gpus` to `accelerators` (adding icons and a CPU + entry); release branches already cut still ship `gpus`, so read + whichever key the mounted content provides. */}} +
{{ if $d.accelerators }}Accelerator{{ else }}GPU{{ end }}
- {{ range $d.gpus }} - {{ .name }} {{ .mem }} + {{ range $d.accelerators | default $d.gpus }} + {{ if .icon }}{{ partial "brand-tile" (dict "entry" . "class" "mp-brand-tile--xs") }}{{ end }}{{ .name }}{{ with .mem }} {{ . }}{{ end }} {{ end }} {{ with $p.Params.gpunote }}{{ . }}{{ end }}