Skip to content

Commit

Permalink
commands: Add --minify to hugo server
Browse files Browse the repository at this point in the history
  • Loading branch information
bep committed Nov 4, 2018
1 parent 2bd9d90 commit 5b1edd2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion commands/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ Complete documentation is available at http://gohugo.io/.`,
cc.cmd.Flags().BoolVarP(&cc.buildWatch, "watch", "w", false, "watch filesystem for changes and recreate as needed")

cc.cmd.Flags().Bool("renderToMemory", false, "render to memory (only useful for benchmark testing)")
cc.cmd.Flags().Bool("minify", false, "minify any supported output format (HTML, XML etc.)")

// Set bash-completion
_ = cc.cmd.PersistentFlags().SetAnnotation("logFile", cobra.BashCompFilenameExt, []string{})
Expand Down Expand Up @@ -232,6 +231,8 @@ func (cc *hugoBuilderCommon) handleFlags(cmd *cobra.Command) {

cmd.Flags().StringSlice("disableKinds", []string{}, "disable different kind of pages (home, RSS etc.)")

cmd.Flags().Bool("minify", false, "minify any supported output format (HTML, XML etc.)")

// Set bash-completion.
// Each flag must first be defined before using the SetAnnotation() call.
_ = cmd.Flags().SetAnnotation("source", cobra.BashCompSubdirsInDir, []string{})
Expand Down

0 comments on commit 5b1edd2

Please sign in to comment.