Fix Hugo deprecation warnings - #101
Merged
Merged
Conversation
Hugo 0.165 on web2 emits two deprecation warnings on every build: languageCode was deprecated in v0.158.0, use locale instead .Site.Data was deprecated in v0.156.0, use hugo.Data instead Rename the config key and switch the nine site.Data lookups in the home layout and shortcodes over to hugo.Data. The $site.Data.Integrity in baseof.html is a resource's .Data, not site data, so it stays. Builds are byte-identical to before the change and now warning-free. This raises the minimum Hugo to v0.158.0; web2 runs v0.165.0. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Lance Albertson <lance@osuosl.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hugo 0.165 on web2 emits two deprecation warnings on every build:
config/_default/hugo.toml:languageCode→locale.site.Datalookups inlayouts/home.htmland the shortcodes →hugo.Data. The$site.Data.Integrityinlayouts/baseof.htmlis a resource's.Data(fingerprint SRI hash), not site data, so it is unchanged.Verification
Built both before and after with
hugo_extended_0.165.0(matching web2):diff -rqof the fullpublic/tree before vs. after: no differences — the rendered site is byte-identical, including<language>en-us</language>in the RSS feeds.Note
This raises the minimum Hugo version to v0.158.0 (
hugo.Dataneeds ≥0.156,localeneeds ≥0.158). web2 is on v0.165.0 so CI is fine, but anyone still on an older local Hugo will need to upgrade — an older binary fails withcan't evaluate field Data in type interface {}.🤖 Generated with Claude Code