WARN deprecated: project config key languageCode was deprecated in
Hugo v0.158.0 and will be removed in a future release. Use locale
instead.
hugo.toml sets languageCode. Hugo deprecated that key in v0.158.0 in
favour of locale, and says it will be removed in a future release. When it
is removed the key becomes silently inert (or the build fails, depending on
how Hugo lands the removal), so this is a latent breakage, not just noise.
Found while working on #7 (PR #17); not fixed there because it is outside
that issue's scope.
Why it is not visible in CI today
The Dockerfile installs hugo from alpine 3.21's apk repo, which is hugo
0.139.0 — older than 0.158.0, so it does not emit the warning. The warning
appears on any newer hugo (seen on 0.164.0). So CI is currently green on a
Hugo old enough not to know about the deprecation, while a developer with a
current Hugo sees the warning locally. That divergence is worth noting on its
own, but is not this issue.
Definition of done
hugo.toml uses locale instead of languageCode.
The site builds clean on a current Hugo with no deprecation warning from
this key.
Rendered output is unchanged (the lang attribute in the emitted HTML and
any language-derived formatting stay the same).
make check passes and script/cibuild succeeds.
Out of scope
Bumping the Hugo version used by the Dockerfile/CI. That is a separate
decision with its own risk and should be its own issue if wanted.
Any other hugo.toml restructuring.
The unrelated taxonomy layout warning, which is already #13.
## Problem
Building the site with a current Hugo emits:
WARN deprecated: project config key languageCode was deprecated in
Hugo v0.158.0 and will be removed in a future release. Use locale
instead.
`hugo.toml` sets `languageCode`. Hugo deprecated that key in v0.158.0 in
favour of `locale`, and says it will be removed in a future release. When it
is removed the key becomes silently inert (or the build fails, depending on
how Hugo lands the removal), so this is a latent breakage, not just noise.
Found while working on #7 (PR #17); not fixed there because it is outside
that issue's scope.
## Why it is not visible in CI today
The `Dockerfile` installs hugo from alpine 3.21's apk repo, which is hugo
0.139.0 — older than 0.158.0, so it does not emit the warning. The warning
appears on any newer hugo (seen on 0.164.0). So CI is currently green on a
Hugo old enough not to know about the deprecation, while a developer with a
current Hugo sees the warning locally. That divergence is worth noting on its
own, but is not this issue.
## Definition of done
1. `hugo.toml` uses `locale` instead of `languageCode`.
2. The site builds clean on a current Hugo with no deprecation warning from
this key.
3. Rendered output is unchanged (the `lang` attribute in the emitted HTML and
any language-derived formatting stay the same).
4. `make check` passes and `script/cibuild` succeeds.
## Out of scope
- Bumping the Hugo version used by the `Dockerfile`/CI. That is a separate
decision with its own risk and should be its own issue if wanted.
- Any other `hugo.toml` restructuring.
- The unrelated taxonomy layout warning, which is already #13.
Sequencing update — this issue is now coupled to #26 (install Hugo at a
deliberate, hash-verified version rather than taking alpine's).
The reason this warning is invisible in CI is stated in the body above: alpine
3.21 serves Hugo 0.139.0, which predates the 0.158.0 deprecation. #26 moves the
build onto a current Hugo, which will surface this warning in CI for the
first time.
So the options are: fix this issue first, or fix it inside #26's branch. What
must not happen is #26 merging and leaving CI newly noisy — that would add a
third routinely-ignored warning alongside #13's taxonomy warning, which is
precisely the "everyone learns to ignore build output" failure mode #13 already
warns about.
Note also that this issue's definition of done says "the site builds clean on a
current Hugo with no deprecation warning from this key". Until #26 lands, that
cannot be verified in CI at all — only locally against a developer's own Hugo.
Whoever picks this up before #26 should say plainly that the verification was
local-only, rather than implying CI confirmed it. Verifying against an
environment that structurally cannot show the problem is the mistake that cost
this repo an outage in #7.
Both this and #13 are prerequisites for #25 (--panicOnWarning), which cannot
land while any warning is outstanding.
Sequencing update — this issue is now coupled to **#26** (install Hugo at a
deliberate, hash-verified version rather than taking alpine's).
The reason this warning is invisible in CI is stated in the body above: alpine
3.21 serves Hugo 0.139.0, which predates the 0.158.0 deprecation. #26 moves the
build onto a current Hugo, which will **surface this warning in CI** for the
first time.
So the options are: fix this issue first, or fix it inside #26's branch. What
must not happen is #26 merging and leaving CI newly noisy — that would add a
third routinely-ignored warning alongside #13's taxonomy warning, which is
precisely the "everyone learns to ignore build output" failure mode #13 already
warns about.
Note also that this issue's definition of done says "the site builds clean on a
current Hugo with no deprecation warning from this key". Until #26 lands, that
cannot be verified in CI at all — only locally against a developer's own Hugo.
Whoever picks this up before #26 should say plainly that the verification was
local-only, rather than implying CI confirmed it. Verifying against an
environment that structurally cannot show the problem is the mistake that cost
this repo an outage in #7.
Both this and #13 are prerequisites for #25 (`--panicOnWarning`), which cannot
land while any warning is outstanding.
Correction to my previous comment: this must NOT land before #26. Tested
rather than assumed, and the result inverts the advice.
Under CI's Hugo 0.139.0, swapping languageCode = 'en-us' for locale = 'en-us' silently changes the generated RSS from <language>en-us</language> to <language>en</language>. Old Hugo does not
know the locale key, ignores it, and falls back to a default. No warning, no
error, exit 0 — an output regression that the gate would not catch.
So: fix this inside #26's branch, after the Hugo version moves. Landing it
first would break output on the Hugo CI actually runs.
Added to the definition of done: the RSS <language> element must still read en-us after the change, verified on the Hugo version the build actually uses.
**Correction to my previous comment: this must NOT land before #26.** Tested
rather than assumed, and the result inverts the advice.
Under CI's Hugo 0.139.0, swapping `languageCode = 'en-us'` for
`locale = 'en-us'` silently changes the generated RSS from
`<language>en-us</language>` to `<language>en</language>`. Old Hugo does not
know the `locale` key, ignores it, and falls back to a default. No warning, no
error, exit 0 — an output regression that the gate would not catch.
So: **fix this inside #26's branch, after the Hugo version moves.** Landing it
first would break output on the Hugo CI actually runs.
Added to the definition of done: the RSS `<language>` element must still read
`en-us` after the change, verified on the Hugo version the build actually uses.
Per the correction above, this is being done inside #26's branch, in a
commit on top of the Hugo version move — not before it.
Commit 1 (#26) moves the build to a deliberate, hash-verified hugo v0.164.0 installed by go install.
Commit 2 (this issue) changes hugo.toml's languageCode = 'en-us' to locale = 'en-us', on top of 1, so the key is never interpreted by a Hugo
that does not know it.
Verification, on the Hugo the build actually uses
RSS <language> element asserted to still read en-us — this is the
regression the second comment above found under 0.139.0, and the whole
reason for the ordering.
lang attribute in the emitted HTML unchanged.
public/ diffed between commit 1 and commit 2: the config change must be a
no-op on rendered output.
No deprecation warning for this key in the build output.
Because #26 is in the same branch, this will be verified in CI and on a real act_runner run of deploy.yml's build job, not local-only.
## Implementation plan
Per the correction above, this is being done **inside #26's branch, in a
commit on top of the Hugo version move** — not before it.
1. Commit 1 (#26) moves the build to a deliberate, hash-verified
**hugo v0.164.0** installed by `go install`.
2. Commit 2 (this issue) changes `hugo.toml`'s `languageCode = 'en-us'` to
`locale = 'en-us'`, on top of 1, so the key is never interpreted by a Hugo
that does not know it.
### Verification, on the Hugo the build actually uses
- RSS `<language>` element asserted to still read `en-us` — this is the
regression the second comment above found under 0.139.0, and the whole
reason for the ordering.
- `lang` attribute in the emitted HTML unchanged.
- `public/` diffed between commit 1 and commit 2: the config change must be a
no-op on rendered output.
- No deprecation warning for this key in the build output.
- Because #26 is in the same branch, this will be verified in CI and on a real
`act_runner` run of `deploy.yml`'s `build` job, not local-only.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Problem
Building the site with a current Hugo emits:
hugo.tomlsetslanguageCode. Hugo deprecated that key in v0.158.0 infavour of
locale, and says it will be removed in a future release. When itis removed the key becomes silently inert (or the build fails, depending on
how Hugo lands the removal), so this is a latent breakage, not just noise.
Found while working on #7 (PR #17); not fixed there because it is outside
that issue's scope.
Why it is not visible in CI today
The
Dockerfileinstalls hugo from alpine 3.21's apk repo, which is hugo0.139.0 — older than 0.158.0, so it does not emit the warning. The warning
appears on any newer hugo (seen on 0.164.0). So CI is currently green on a
Hugo old enough not to know about the deprecation, while a developer with a
current Hugo sees the warning locally. That divergence is worth noting on its
own, but is not this issue.
Definition of done
hugo.tomluseslocaleinstead oflanguageCode.this key.
langattribute in the emitted HTML andany language-derived formatting stay the same).
make checkpasses andscript/cibuildsucceeds.Out of scope
Dockerfile/CI. That is a separatedecision with its own risk and should be its own issue if wanted.
hugo.tomlrestructuring.Sequencing update — this issue is now coupled to #26 (install Hugo at a
deliberate, hash-verified version rather than taking alpine's).
The reason this warning is invisible in CI is stated in the body above: alpine
3.21 serves Hugo 0.139.0, which predates the 0.158.0 deprecation. #26 moves the
build onto a current Hugo, which will surface this warning in CI for the
first time.
So the options are: fix this issue first, or fix it inside #26's branch. What
must not happen is #26 merging and leaving CI newly noisy — that would add a
third routinely-ignored warning alongside #13's taxonomy warning, which is
precisely the "everyone learns to ignore build output" failure mode #13 already
warns about.
Note also that this issue's definition of done says "the site builds clean on a
current Hugo with no deprecation warning from this key". Until #26 lands, that
cannot be verified in CI at all — only locally against a developer's own Hugo.
Whoever picks this up before #26 should say plainly that the verification was
local-only, rather than implying CI confirmed it. Verifying against an
environment that structurally cannot show the problem is the mistake that cost
this repo an outage in #7.
Both this and #13 are prerequisites for #25 (
--panicOnWarning), which cannotland while any warning is outstanding.
Correction to my previous comment: this must NOT land before #26. Tested
rather than assumed, and the result inverts the advice.
Under CI's Hugo 0.139.0, swapping
languageCode = 'en-us'forlocale = 'en-us'silently changes the generated RSS from<language>en-us</language>to<language>en</language>. Old Hugo does notknow the
localekey, ignores it, and falls back to a default. No warning, noerror, exit 0 — an output regression that the gate would not catch.
So: fix this inside #26's branch, after the Hugo version moves. Landing it
first would break output on the Hugo CI actually runs.
Added to the definition of done: the RSS
<language>element must still readen-usafter the change, verified on the Hugo version the build actually uses.Implementation plan
Per the correction above, this is being done inside #26's branch, in a
commit on top of the Hugo version move — not before it.
hugo v0.164.0 installed by
go install.hugo.toml'slanguageCode = 'en-us'tolocale = 'en-us', on top of 1, so the key is never interpreted by a Hugothat does not know it.
Verification, on the Hugo the build actually uses
<language>element asserted to still readen-us— this is theregression the second comment above found under 0.139.0, and the whole
reason for the ordering.
langattribute in the emitted HTML unchanged.public/diffed between commit 1 and commit 2: the config change must be ano-op on rendered output.
act_runnerrun ofdeploy.yml'sbuildjob, not local-only.