Use hugo.toml locale instead of languageCode (closes #18)
Hugo deprecated the project config key `languageCode` in v0.158.0 in
favour of `locale`, and says it will be removed. The preceding commit
moves the build onto hugo v0.164.0, which 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.
Left alone that would be a third routinely-ignored warning in the build
output alongside #13's taxonomy warning, and a latent breakage once the
key is dropped.
Sequencing matters and is why this rides in the same branch, on top of
the version move rather than before it. Under the apk hugo 0.139.0 that
CI ran until the preceding commit, `locale` is simply an unknown key:
0.139.0 ignores it and falls back, which downgrades the generated RSS
from <language>en-us</language> to <language>en</language>. No warning,
no error, exit 0 - an output regression the gate would not have caught.
Landing this first would have broken the published feed.
Verified on hugo v0.164.0, the version the build now actually uses:
- the RSS <language> element still reads en-us;
- the html lang attribute is unchanged;
- public/ is byte-identical to the preceding commit's output, so the
key swap is a pure no-op on rendered content;
- the deprecation warning is gone from the build output.
This commit is contained in:
11
TODO.md
11
TODO.md
@@ -27,6 +27,17 @@ Update `README.md` accordingly.
|
||||
|
||||
# Completed Steps
|
||||
|
||||
- 2026-08-09: replaced `hugo.toml`'s deprecated `languageCode` key with `locale`
|
||||
(closes #18). Hugo deprecated `languageCode` in v0.158.0, so the Hugo pinned
|
||||
in the preceding commit warns about it; left alone it would become a third
|
||||
routinely-ignored warning, and a latent breakage when the key is removed.
|
||||
Deliberately sequenced **after** the Hugo version move and in the same branch:
|
||||
under the apk hugo 0.139.0 that CI ran until now, `locale` is an unknown key
|
||||
that is silently ignored, which downgrades the generated RSS from
|
||||
`<language>en-us</language>` to `<language>en</language>` with no warning and
|
||||
exit 0. Verified on hugo v0.164.0 that the RSS `<language>` still reads
|
||||
`en-us`, the `lang` attribute is unchanged, and `public/` is byte-identical to
|
||||
the preceding commit's output
|
||||
- 2026-08-09: installed Hugo at a deliberate, hash-verified version instead of
|
||||
taking whatever alpine ships (closes #26). `script/bootstrap` no longer does
|
||||
`pkg_install hugo`; it installs `github.com/gohugoio/hugo@v0.164.0` with
|
||||
|
||||
Reference in New Issue
Block a user