From 404fd9e5128e44b17dc453531ec0b97dc0812d13 Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Wed, 17 Sep 2025 09:11:12 -0700 Subject: [PATCH] commands: Map --minify CLI flag to the correct configuration key Closes #13988 --- commands/helpers.go | 2 +- testscripts/commands/hugo__minify_issue13988.txt | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 testscripts/commands/hugo__minify_issue13988.txt diff --git a/commands/helpers.go b/commands/helpers.go index a13bdebc2..5aee7078f 100644 --- a/commands/helpers.go +++ b/commands/helpers.go @@ -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", } diff --git a/testscripts/commands/hugo__minify_issue13988.txt b/testscripts/commands/hugo__minify_issue13988.txt new file mode 100644 index 000000000..122494ce3 --- /dev/null +++ b/testscripts/commands/hugo__minify_issue13988.txt @@ -0,0 +1,13 @@ +hugo --minify --logLevel=info + +! stderr 'deprecated' +grep '

one

two

' public/index.html + +-- hugo.toml -- +disableKinds = ['page','rss','section','sitemap','taxonomy','term'] +-- content/_index.md -- +one + +two +-- layouts/all.html -- +{{ .Content }} -- 2.39.5