diff options
Diffstat (limited to 'commands')
-rw-r--r-- | commands/gendocshelper.go | 2 | ||||
-rw-r--r-- | commands/hugo.go | 9 |
2 files changed, 2 insertions, 9 deletions
diff --git a/commands/gendocshelper.go b/commands/gendocshelper.go index c243581f6..68ac035ee 100644 --- a/commands/gendocshelper.go +++ b/commands/gendocshelper.go @@ -64,7 +64,7 @@ func (g *genDocsHelper) generate() error { enc := json.NewEncoder(f) enc.SetIndent("", " ") - if err := enc.Encode(docshelper.DocProviders); err != nil { + if err := enc.Encode(docshelper.GetDocProvider()); err != nil { return err } diff --git a/commands/hugo.go b/commands/hugo.go index 841318685..b7392bc42 100644 --- a/commands/hugo.go +++ b/commands/hugo.go @@ -231,11 +231,6 @@ func initializeFlags(cmd *cobra.Command, cfg config.Provider) { "duplicateTargetPaths", } - // Will set a value even if it is the default. - flagKeysForced := []string{ - "minify", - } - for _, key := range persFlagKeys { setValueFromFlag(cmd.PersistentFlags(), key, cfg, "", false) } @@ -243,9 +238,7 @@ func initializeFlags(cmd *cobra.Command, cfg config.Provider) { setValueFromFlag(cmd.Flags(), key, cfg, "", false) } - for _, key := range flagKeysForced { - setValueFromFlag(cmd.Flags(), key, cfg, "", true) - } + setValueFromFlag(cmd.Flags(), "minify", cfg, "minifyOutput", true) // Set some "config aliases" setValueFromFlag(cmd.Flags(), "destination", cfg, "publishDir", false) |