mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-28 22:50:35 +03:00
parent
018602c46d
commit
4d32f2fa89
23 changed files with 299 additions and 336 deletions
|
@ -28,17 +28,13 @@ var _ cmder = (*genManCmd)(nil)
|
|||
|
||||
type genManCmd struct {
|
||||
genmandir string
|
||||
cmd *cobra.Command
|
||||
}
|
||||
|
||||
func (c *genManCmd) getCommand() *cobra.Command {
|
||||
return c.cmd
|
||||
*baseCmd
|
||||
}
|
||||
|
||||
func newGenManCmd() *genManCmd {
|
||||
cc := &genManCmd{}
|
||||
|
||||
cc.cmd = &cobra.Command{
|
||||
cc.baseCmd = newBaseCmd(&cobra.Command{
|
||||
Use: "man",
|
||||
Short: "Generate man pages for the Hugo CLI",
|
||||
Long: `This command automatically generates up-to-date man pages of Hugo's
|
||||
|
@ -69,7 +65,7 @@ in the "man" directory under the current directory.`,
|
|||
|
||||
return nil
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
cc.cmd.PersistentFlags().StringVar(&cc.genmandir, "dir", "man/", "the directory to write the man pages.")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue