Skip to content

Commit 404fd9e

Browse files
jmooringbep
authored andcommitted
commands: Map --minify CLI flag to the correct configuration key
Closes #13988
1 parent b1b0cde commit 404fd9e

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

‎commands/helpers.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ func flagsToCfgWithAdditionalConfigBase(cd *simplecobra.Commandeer, cfg config.P
7676

7777
// Flags with a different name in the config.
7878
keyMap := map[string]string{
79-
"minify": "minifyOutput",
79+
"minify": "minify.minifyOutput",
8080
"destination": "publishDir",
8181
"editor": "newContentEditor",
8282
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
hugo --minify --logLevel=info
2+
3+
! stderr 'deprecated'
4+
grep '<p>one</p><p>two</p>' public/index.html
5+
6+
-- hugo.toml --
7+
disableKinds = ['page','rss','section','sitemap','taxonomy','term']
8+
-- content/_index.md --
9+
one
10+
11+
two
12+
-- layouts/all.html --
13+
{{ .Content }}

0 commit comments

Comments
 (0)