Skip to content

fix:Hugo compatibility: replace deprecated template funcs and fix builds#699

Merged
LukasWallrich merged 7 commits intomasterfrom
compat
Mar 19, 2026
Merged

fix:Hugo compatibility: replace deprecated template funcs and fix builds#699
LukasWallrich merged 7 commits intomasterfrom
compat

Conversation

@richarddushime
Copy link
Contributor

@richarddushime richarddushime commented Mar 12, 2026

Description

This PR updates legacy Hugo template usage to work with latest Hugo versions and resolves follow-on template/runtime regressions discovered during verification. The site now builds successfully.

What changed

  • Replaced deprecated getJSON usage for local summaries data with site data access.
  • Replaced deprecated remote getJSON usage with resources.GetRemote plus transform.Unmarshal.
  • Replaced deprecated getCSV usage with resources.GetRemote plus transform.Unmarshal (CSV delimiter specified).
  • Updated Google Analytics fallback to Hugo’s current config path (services.googleAnalytics.id equivalent via site config access).
  • Fixed search index template field access for creators to use front matter params safely and consistently.

Why

Recent Hugo versions removed older global template helpers and some legacy config fields, causing template parse/build failures. These changes migrate templates to current Hugo APIs while preserving existing behavior.

Type of Change

  • Bug fix

Testing

Checklist

  • Self-reviewed my changes
  • Verified links and formatting are correct
  • No new warnings or errors

Notes

@github-actions
Copy link
Contributor

👍 All image files/references (if any) are in webp format, in line with our policy.

@richarddushime richarddushime marked this pull request as ready for review March 12, 2026 10:56
@richarddushime richarddushime requested a review from a team as a code owner March 12, 2026 10:56
@richarddushime richarddushime changed the title fix:Hugo compatibility: replace deprecated template funcs and fix builds fix:Hugo compatibility: replace deprecated template funcs and fix builds [still in discussions] Mar 12, 2026
@LukasWallrich
Copy link
Contributor

LukasWallrich commented Mar 12, 2026

Staging Deployment Status

This PR has been successfully deployed to staging as part of an aggregated deployment.

Deployed at: 2026-03-19 15:23:57 UTC
Staging URL: https://staging.forrt.org

The staging site shows the combined state of all compatible open PRs.

@richarddushime richarddushime added IOI grant This issue is part of the Invest in Open Infrastructure grant for Team Website still-in-discussions and removed IOI grant This issue is part of the Invest in Open Infrastructure grant for Team Website labels Mar 12, 2026
@LukasWallrich
Copy link
Contributor

@richarddushime can you bump the hugo version in the action on this branch, so that we can test it on staging?

@forrtproject forrtproject deleted a comment from github-actions bot Mar 12, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 13, 2026

✅ Spell Check Passed

No spelling issues found when checking 5 changed file(s)! 🎉

@richarddushime
Copy link
Contributor Author

richarddushime commented Mar 19, 2026

@richarddushime can you bump the hugo version in the action on this branch, so that we can test it on staging?

I have just pinned to 0.158.0 version
passing ci link

@richarddushime richarddushime changed the title fix:Hugo compatibility: replace deprecated template funcs and fix builds [still in discussions] fix:Hugo compatibility: replace deprecated template funcs and fix builds Mar 19, 2026
@richarddushime
Copy link
Contributor Author

@LukasWallrich Good to go

@LukasWallrich LukasWallrich merged commit 9b84cae into master Mar 19, 2026
7 checks passed
@LukasWallrich LukasWallrich deleted the compat branch March 19, 2026 23:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants