Thanks to visit codestin.com
Credit goes to github.com

Skip to content

lang key in cascade.params emits a false-positive deprecation error #14848

@curegit

Description

@curegit

When a content file has a lang key under cascade.params in its front matter, Hugo reports the following error and build fails:

ERROR deprecated: lang in front matter was deprecated in Hugo v0.144.0 and subsequently removed.

This doesn't seem to happen if lang is defined under "normal" params in each page front matter.

How to reproduce

Create a content file with a lang key under cascade.params in the front matter:

---
cascade:
  params:
    lang: en
---

ABC

Then run the following commands:

hugo new project quickstart
cd quickstart

# Add the markdown file above as content.
# ...

git init
git submodule add https://github.com/adityatelange/hugo-PaperMod.git themes/PaperMod
hugo server --theme PaperMod

What version of Hugo are you using (hugo version)?

$ hugo version
hugo v0.161.1-ea8f66a7ce988664dcc84c052fc96757042e2e4a windows/amd64 BuildDate=2026-04-29T13:56:01Z VendorInfo=gohugoio

Does this issue reproduce with the latest release?

Yes.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions