feat(hugo): replace deprecated APIs for Hugo v0.156+ compatibility

Migrate site.Data → hugo.Data (42 occurrences), site.IsMultiLingual →
hugo.IsMultilingual, and site.AllPages → hugo.Sites nested range.
Simplify Netlify redirects template to use pre-processed aliases
instead of relLangURL per gohugoio/hugo#14408.
This commit is contained in:
George Cushen committed 2026-03-27 03:25:42 +00:00
1 parent 94703c5c4f
commit ef8ed449c7
25 files changed
+5824 -5838

No files matched your search

+4 -4
View File
@@ -17,7 +17,7 @@
{{ with $page.Params.sections_source }}
{{ $key := . }}
{{ if hasPrefix $key "pages/" }}{{ $key = replace $key "pages/" "" }}{{ end }}
{{ with index $.Site.Data.pages $key }}
{{ with index hugo.Data.pages $key }}
{{ $base := .sections }}
{{ if $sections }}
{{ $merged := slice }}
@@ -54,7 +54,7 @@
{{ end }}
{{ end }}
{{ if eq $page.RelPermalink "/" }}{{ $p = "home" }}{{ end }}
{{ with index $.Site.Data.pages $p }}
{{ with index hugo.Data.pages $p }}
{{ $sections = .sections }}
{{ end }}
{{ end }}
@@ -68,7 +68,7 @@
{{ $ref := lower . }}
{{ $path := cond (hasPrefix $ref "blocks/") $ref (printf "blocks/%s" $ref) }}
{{ $parts := split $path "/" }}
{{ $data := $.Site.Data }}
{{ $data := hugo.Data }}
{{ range $j, $p := $parts }}
{{ if $data }}{{ $data = index $data $p }}{{ end }}
{{ end }}
@@ -87,7 +87,7 @@
{{ if or (not $block.demo) ($block.demo | and (eq (os.Getenv "HUGO_BLOX_DEMO") "true")) }}
{{- $block_type := partial "hbx/resolve-block-param" (dict "config" $block "context" "content section") | default "markdown" -}}
{{ $block_type = lower $block_type }}
{{ range $r := .Site.Data.blox_aliases.renames }}
{{ range $r := hugo.Data.blox_aliases.renames }}
{{ $block_type = cond (eq $block_type $r.old) $r.new $block_type }}
{{ end }}