Skip to content

fix: Hugo language related deprecation (v0.158.0+)#1334

Open
Bigstool wants to merge 1 commit intoCaiJimmy:masterfrom
Bigstool:language-deprecation
Open

fix: Hugo language related deprecation (v0.158.0+)#1334
Bigstool wants to merge 1 commit intoCaiJimmy:masterfrom
Bigstool:language-deprecation

Conversation

@Bigstool
Copy link
Copy Markdown
Contributor

Reference: https://github.com/gohugoio/hugo/releases/tag/v0.158.0

When building the webpage, Hugo gives the following warnings:

WARN  deprecated: project config key languageCode was deprecated in Hugo v0.158.0 and will be removed in a future release. Use locale instead.
WARN  deprecated: .Site.LanguageCode was deprecated in Hugo v0.158.0 and will be removed in a future release. Use .Site.Language.Locale instead.
WARN  deprecated: .Language.LanguageDirection was deprecated in Hugo v0.158.0 and will be removed in a future release. Use .Language.Direction instead.
WARN  deprecated: .Language.LanguageCode was deprecated in Hugo v0.158.0 and will be removed in a future release. Use .Language.Locale instead.

This PR makes the following changes in code:

.Site.LanguageCode -> .Site.Language.Locale
.Language.LanguageDirection -> .Language.Direction
.Language.LanguageCode -> .Language.Locale

Additionally, in the configuration file hugo.toml, the user is expected to change languageCode to locale.

Reference: https://github.com/gohugoio/hugo/releases/tag/v0.158.0
.Site.LanguageCode -> .Site.Language.Locale
.Language.LanguageDirection -> .Language.Direction
.Language.LanguageCode -> .Language.Locale

Also, in the configuration hugo.toml, the user should change `languageCode` to `locale`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant