Skip to content

Commit c626354

Browse files
committed
Fix production build: use .Site.Data instead of hugo.Data
hugo.Data was only added in a later Hugo release than the 0.154.5 pinned in the deploy workflow — CI failed with "can't evaluate field Data in type interface {}" when building /resources/, breaking the last deploy (main branch had a red build, GitHub Pages did not update). .Site.Data is the long-standing, always-supported API for reading files under data/ — it works identically here, just with a harmless deprecation warning on newer Hugo. Verified with a full `hugo --minify` build locally.
1 parent 7ee45ad commit c626354

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎layouts/resources/list.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ <h2 class="resource-hub-card-title">{{ .Title }}</h2>
5555
</div>
5656

5757
{{/* ── Recently added ── */}}
58-
{{ $dates := hugo.Data.resource_added }}
58+
{{ $dates := .Site.Data.resource_added }}
5959
{{ $recentItems := slice }}
6060
{{ range .Sections }}
6161
{{ if not .Params.hidden_from_hub }}

0 commit comments

Comments
 (0)