commands: Map --minify CLI flag to the correct configuration key

Closes #13988
This commit is contained in:
Joe Mooring
2025-09-17 09:11:12 -07:00
committed by Bjørn Erik Pedersen
parent b1b0cdee3a
commit 404fd9e512
2 changed files with 14 additions and 1 deletions

View File

@@ -76,7 +76,7 @@ func flagsToCfgWithAdditionalConfigBase(cd *simplecobra.Commandeer, cfg config.P
// Flags with a different name in the config.
keyMap := map[string]string{
"minify": "minifyOutput",
"minify": "minify.minifyOutput",
"destination": "publishDir",
"editor": "newContentEditor",
}

View File

@@ -0,0 +1,13 @@
hugo --minify --logLevel=info
! stderr 'deprecated'
grep '<p>one</p><p>two</p>' public/index.html
-- hugo.toml --
disableKinds = ['page','rss','section','sitemap','taxonomy','term']
-- content/_index.md --
one
two
-- layouts/all.html --
{{ .Content }}