mirror of
https://github.com/gohugoio/hugo.git
synced 2025-01-27 14:51:30 +00: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 autocompleteType string
|
||||||
|
|
||||||
var genautocompleteCmd = &cobra.Command{
|
var genautocompleteCmd = &cobra.Command{
|
||||||
Use: "genautocomplete",
|
Use: "autocomplete",
|
||||||
Short: "Generate shell autocompletion script for Hugo",
|
Short: "Generate shell autocompletion script for Hugo",
|
||||||
Long: `Generates a shell autocompletion script for Hugo.
|
Long: `Generates a shell autocompletion script for Hugo.
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ url: %s
|
||||||
|
|
||||||
var gendocdir string
|
var gendocdir string
|
||||||
var gendocCmd = &cobra.Command{
|
var gendocCmd = &cobra.Command{
|
||||||
Use: "gendoc",
|
Use: "doc",
|
||||||
Short: "Generate Markdown documentation for the Hugo CLI.",
|
Short: "Generate Markdown documentation for the Hugo CLI.",
|
||||||
Long: `Generate Markdown documentation for the Hugo CLI.
|
Long: `Generate Markdown documentation for the Hugo CLI.
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
var genmanCmd = &cobra.Command{
|
var genmanCmd = &cobra.Command{
|
||||||
Use: "genman",
|
Use: "man",
|
||||||
Short: "Generate man pages for the Hugo CLI",
|
Short: "Generate man pages for the Hugo CLI",
|
||||||
Long: `This command automatically generates up-to-date man pages of Hugo's
|
Long: `This command automatically generates up-to-date man pages of Hugo's
|
||||||
command-line interface. By default, it creates the man page files
|
command-line interface. By default, it creates the man page files
|
||||||
|
|
|
@ -86,10 +86,13 @@ func AddCommands() {
|
||||||
HugoCmd.AddCommand(newCmd)
|
HugoCmd.AddCommand(newCmd)
|
||||||
HugoCmd.AddCommand(listCmd)
|
HugoCmd.AddCommand(listCmd)
|
||||||
HugoCmd.AddCommand(undraftCmd)
|
HugoCmd.AddCommand(undraftCmd)
|
||||||
HugoCmd.AddCommand(genautocompleteCmd)
|
|
||||||
HugoCmd.AddCommand(gendocCmd)
|
|
||||||
HugoCmd.AddCommand(genmanCmd)
|
|
||||||
HugoCmd.AddCommand(importCmd)
|
HugoCmd.AddCommand(importCmd)
|
||||||
|
|
||||||
|
HugoCmd.AddCommand(genCmd)
|
||||||
|
genCmd.AddCommand(genautocompleteCmd)
|
||||||
|
genCmd.AddCommand(gendocCmd)
|
||||||
|
genCmd.AddCommand(genmanCmd)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Initializes flags
|
//Initializes flags
|
||||||
|
|
Loading…
Reference in a new issue