From 9ce906907b1ebc1d4beb0de66085e345365e0b92 Mon Sep 17 00:00:00 2001 From: David Karlsson <35727626+dvdksn@users.noreply.github.com> Date: Thu, 7 Nov 2024 15:51:44 +0100 Subject: [PATCH 1/2] ci: upgrade hugo to v0.138.0 Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> --- Dockerfile | 2 +- netlify.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index d679af852bc4..43ecafd4e6be 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ ARG ALPINE_VERSION=3.20 ARG GO_VERSION=1.23 ARG HTMLTEST_VERSION=0.17.0 -ARG HUGO_VERSION=0.136.5 +ARG HUGO_VERSION=0.138.0 ARG NODE_VERSION=22 ARG PAGEFIND_VERSION=1.1.1 diff --git a/netlify.toml b/netlify.toml index da603d4300b4..d1e602c4620a 100644 --- a/netlify.toml +++ b/netlify.toml @@ -4,7 +4,7 @@ publish = "public" [context.deploy-preview.environment] NODE_VERSION = "22" NODE_ENV = "production" -HUGO_VERSION = "0.136.5" +HUGO_VERSION = "0.138.0" HUGO_ENABLEGITINFO = "true" HUGO_ENVIRONMENT = "preview" From 54e84be1458d59162e3efd03afe7c6dfdd07e246 Mon Sep 17 00:00:00 2001 From: David Karlsson <35727626+dvdksn@users.noreply.github.com> Date: Thu, 7 Nov 2024 15:59:16 +0100 Subject: [PATCH 2/2] hugo(refactor): use Page.Store instead of Page.Scratch Page.Scratch was soft-deprecated in v0.138.0 https://github.com/gohugoio/hugo/releases/tag/v0.138.0 Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> --- layouts/_default/cli.html | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/layouts/_default/cli.html b/layouts/_default/cli.html index 58c99c2c2c9d..a18752576c22 100644 --- a/layouts/_default/cli.html +++ b/layouts/_default/cli.html @@ -5,8 +5,8 @@ {{ else }} {{ $data = index site.Data .Params.datafile }} {{ end }} - {{ .Scratch.Set "headings" slice }} - {{ .Scratch.Set "subheadings" slice }} + {{ .Store.Set "headings" slice }} + {{ .Store.Set "subheadings" slice }}
{{ partial "breadcrumbs.html" . }} @@ -84,11 +84,11 @@

{{ .Title }}

{{ $heading := dict "level" 2 "text" "Description" }} {{ partialCached "heading.html" $heading "cli-description" }} {{ $subHeadings := (strings.FindRE `(?m:#{3,4} .*)` .) }} - {{ $.Scratch.Add "headings" $heading }} + {{ $.Store.Add "headings" $heading }} {{ range $subHeadings }} {{ $lvl := strings.Count "#" . }} {{ $txt := strings.TrimLeft "# " . }} - {{ $.Scratch.Add "headings" (dict "level" $lvl "text" $txt) }} + {{ $.Store.Add "headings" (dict "level" $lvl "text" $txt) }} {{ end }} {{ . | $.RenderString (dict "display" "block") }} {{ end }} @@ -97,7 +97,7 @@

{{ .Title }}

{{ with $opts }} {{ $heading := dict "level" 2 "text" "Options" }} {{ partialCached "heading.html" $heading "cli-options" }} - {{ $.Scratch.Add "headings" $heading }} + {{ $.Store.Add "headings" $heading }}
@@ -162,18 +162,18 @@

{{ .Title }}

{{ $heading := dict "level" 2 "text" "Examples" }} {{ partialCached "heading.html" $heading "cli-examples" }} {{ $subHeadings := (strings.FindRE `(?m:#{3,4} .*)` .) }} - {{ $.Scratch.Add "headings" $heading }} + {{ $.Store.Add "headings" $heading }} {{ range $subHeadings }} {{ $lvl := strings.Count "#" . }} {{ $txt := strings.TrimLeft "# " . }} - {{ $.Scratch.Add "headings" (dict "level" $lvl "text" $txt) }} + {{ $.Store.Add "headings" (dict "level" $lvl "text" $txt) }} {{ end }} {{ $.RenderString (dict "display" "block") . }} {{ end }} {{ if eq .Kind "section" }} {{ $heading := dict "level" 2 "text" "Subcommands" }} {{ partialCached "heading.html" $heading "cli-subcommands" }} - {{ $.Scratch.Add "headings" $heading }} + {{ $.Store.Add "headings" $heading }}
@@ -202,7 +202,7 @@

{{ .Title }}

{{ T "tableOfContents" }}