fix: replace deprecated .Site.Data with hugo.Data (#1322)

fix: replace deprecated .Site.Data with hugo.Data

Use hugo.Data instead of deprecated .Site.Data (Hugo v0.156.0+)
This commit is contained in:
powerfullz
2026-04-26 13:16:38 +02:00
committed by GitHub
parent 6f3ab760f9
commit 9ddd11797b
2 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
{{- $List := index .Context.Site.Data.external .Namespace -}}
{{- $List := index hugo.Data.external .Namespace -}}
{{- with $List -}}
{{- range . -}}
{{- if eq .type "script" -}}
@@ -26,4 +26,4 @@
{{- end -}}
{{- else -}}
{{- errorf "Error: external resource '%s' is not found" .Namespace -}}
{{- end -}}
{{- end -}}