commandName = subCommandName
}
cmd.Use = fmt.Sprintf("%s [flags]", commandName)
- cmd.Short = fmt.Sprintf("%s builds your site", commandName)
+ cmd.Short = "Build your site"
cmd.Long = `COMMAND_NAME is the main command, used to build your Hugo site.
Hugo is a Fast and Flexible Static Site Generator
func (c *configCommand) Init(cd *simplecobra.Commandeer) error {
c.r = cd.Root.Command.(*rootCommand)
cmd := cd.CobraCommand
- cmd.Short = "Print the site configuration"
- cmd.Long = `Print the site configuration, both default and custom settings.`
+ cmd.Short = "Display site configuration"
+ cmd.Long = `Display site configuration, both default and custom settings.`
cmd.Flags().StringVar(&c.format, "format", "toml", "preferred file format (toml, yaml or json)")
_ = cmd.RegisterFlagCompletionFunc("format", cobra.FixedCompletions([]string{"toml", "yaml", "json"}, cobra.ShellCompDirectiveNoFileComp))
cmd.Flags().StringVar(&c.lang, "lang", "", "the language to display config for. Defaults to the first language defined.")
func (c *convertCommand) Init(cd *simplecobra.Commandeer) error {
cmd := cd.CobraCommand
- cmd.Short = "Convert your content to different formats"
- cmd.Long = `Convert your content (e.g. front matter) to different formats.
+ cmd.Short = "Convert front matter to another format"
+ cmd.Long = `Convert front matter to another format.
See convert's subcommands toJSON, toTOML and toYAML for more information.`
func newDeployCommand() simplecobra.Commander {
return &simpleCommand{
name: "deploy",
- short: "Deploy your site to a Cloud provider.",
- long: `Deploy your site to a Cloud provider.
+ short: "Deploy your site to a cloud provider",
+ long: `Deploy your site to a cloud provider
See https://gohugo.io/hosting-and-deployment/hugo-deploy/ for detailed
documentation.
func newEnvCommand() simplecobra.Commander {
return &simpleCommand{
name: "env",
- short: "Print Hugo version and environment info",
- long: "Print Hugo version and environment info. This is useful in Hugo bug reports",
+ short: "Display version and environment info",
+ long: "Display version and environment info. This is useful in Hugo bug reports",
run: func(ctx context.Context, cd *simplecobra.Commandeer, r *rootCommand, args []string) error {
r.Printf("%s\n", hugo.BuildVersionString())
r.Printf("GOOS=%q\n", runtime.GOOS)
r.Println(hugo.BuildVersionString())
return nil
},
- short: "Print Hugo version and environment info",
- long: "Print Hugo version and environment info. This is useful in Hugo bug reports.",
+ short: "Display version",
+ long: "Display version and environment info. This is useful in Hugo bug reports.",
withc: func(cmd *cobra.Command, r *rootCommand) {
cmd.ValidArgsFunction = cobra.NoFileCompletions
},
func (c *genCommand) Init(cd *simplecobra.Commandeer) error {
cmd := cd.CobraCommand
- cmd.Short = "A collection of several useful generators."
+ cmd.Short = "Generate documentation and syntax highlighting styles"
+ cmd.Long = "Generate documentation for your project using Hugo's documentation engine, including syntax highlighting for various programming languages."
cmd.RunE = nil
return nil
func (c *importCommand) Init(cd *simplecobra.Commandeer) error {
cmd := cd.CobraCommand
- cmd.Short = "Import your site from others."
- cmd.Long = `Import your site from other web site generators like Jekyll.
+ cmd.Short = "Import a site from another system"
+ cmd.Long = `Import a site from another system.
Import requires a subcommand, e.g. ` + "`hugo import jekyll jekyll_root_path target_path`."
func (c *listCommand) Init(cd *simplecobra.Commandeer) error {
cmd := cd.CobraCommand
- cmd.Short = "Listing out various types of content"
- cmd.Long = `Listing out various types of content.
+ cmd.Short = "List content"
+ cmd.Long = `List content.
List requires a subcommand, e.g. hugo list drafts`
func (c *modCommands) Init(cd *simplecobra.Commandeer) error {
cmd := cd.CobraCommand
- cmd.Short = "Various Hugo Modules helpers."
+ cmd.Short = "Manage modules"
cmd.Long = `Various helpers to help manage the modules in your project's dependency graph.
Most operations here requires a Go version installed on your system (>= Go 1.12) and the relevant VCS client (typically Git).
This is not needed if you only operate on modules inside /themes or if you have vendored them via "hugo mod vendor".
&simpleCommand{
name: "content",
use: "content [path]",
- short: "Create new content for your site",
+ short: "Create new content",
long: `Create a new content file and automatically set the date and title.
It will guess which kind of file to create based on the path provided.
func (c *newCommand) Init(cd *simplecobra.Commandeer) error {
cmd := cd.CobraCommand
- cmd.Short = "Create new content for your site"
+ cmd.Short = "Create new content"
cmd.Long = `Create a new content file and automatically set the date and title.
It will guess which kind of file to create based on the path provided.
func (c *serverCommand) Init(cd *simplecobra.Commandeer) error {
cmd := cd.CobraCommand
- cmd.Short = "A high performance webserver"
+ cmd.Short = "Start the embedded web server"
cmd.Long = `Hugo provides its own webserver which builds and serves the site.
While hugo server is high performance, it is a webserver with limited options.
# Test the config command.
hugo config -h
-stdout 'Print the site configuration'
+stdout 'Display site configuration'
hugo config
# Test the convert commands.
hugo convert -h
-stdout 'Convert your content'
+stdout 'Convert front matter to another format'
hugo convert toJSON -h
stdout 'to use JSON for the front matter'
hugo convert toTOML -h
# Test the deploy command.
hugo deploy -h
-stdout 'Deploy your site to a Cloud provider\.'
+stdout 'Deploy your site to a cloud provider'
mkdir mybucket
hugo deploy --target mydeployment --invalidateCDN=false
grep 'hello' mybucket/index.html
env NUM_COMMANDS=44
hugo gen -h
-stdout 'A collection of several useful generators\.'
+stdout 'Generate documentation for your project using Hugo''s documentation engine, including syntax highlighting for various programming languages\.'
hugo gen doc --dir clidocs
checkfilecount $NUM_COMMANDS clidocs
-# Test the import jekyll command.
+# Test the import + import jekyll command.
hugo import -h
-stdout 'Import your site from other web site generators like Jekyll\.'
+stdout 'Import a site from another system'
hugo import jekyll -h
stdout 'hugo import from Jekyll\.'