mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
parent
831e936846
commit
3d09de8910
5 changed files with 19 additions and 6 deletions
10
commands/gen.go
Normal file
10
commands/gen.go
Normal file
|
@ -0,0 +1,10 @@
|
|||
package commands
|
||||
|
||||
import (
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var genCmd = &cobra.Command{
|
||||
Use: "gen",
|
||||
Short: "A collection of several useful generators.",
|
||||
}
|
|
@ -11,7 +11,7 @@ var autocompleteTarget string
|
|||
var autocompleteType string
|
||||
|
||||
var genautocompleteCmd = &cobra.Command{
|
||||
Use: "genautocomplete",
|
||||
Use: "autocomplete",
|
||||
Short: "Generate shell autocompletion script for Hugo",
|
||||
Long: `Generates a shell autocompletion script for Hugo.
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ url: %s
|
|||
|
||||
var gendocdir string
|
||||
var gendocCmd = &cobra.Command{
|
||||
Use: "gendoc",
|
||||
Use: "doc",
|
||||
Short: "Generate Markdown documentation for the Hugo CLI.",
|
||||
Long: `Generate Markdown documentation for the Hugo CLI.
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
)
|
||||
|
||||
var genmanCmd = &cobra.Command{
|
||||
Use: "genman",
|
||||
Use: "man",
|
||||
Short: "Generate man pages for the Hugo CLI",
|
||||
Long: `This command automatically generates up-to-date man pages of Hugo's
|
||||
command-line interface. By default, it creates the man page files
|
||||
|
|
|
@ -86,10 +86,13 @@ func AddCommands() {
|
|||
HugoCmd.AddCommand(newCmd)
|
||||
HugoCmd.AddCommand(listCmd)
|
||||
HugoCmd.AddCommand(undraftCmd)
|
||||
HugoCmd.AddCommand(genautocompleteCmd)
|
||||
HugoCmd.AddCommand(gendocCmd)
|
||||
HugoCmd.AddCommand(genmanCmd)
|
||||
HugoCmd.AddCommand(importCmd)
|
||||
|
||||
HugoCmd.AddCommand(genCmd)
|
||||
genCmd.AddCommand(genautocompleteCmd)
|
||||
genCmd.AddCommand(gendocCmd)
|
||||
genCmd.AddCommand(genmanCmd)
|
||||
|
||||
}
|
||||
|
||||
//Initializes flags
|
||||
|
|
Loading…
Reference in a new issue