mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-27 06:00:25 +03:00
parent
7ce033a89d
commit
8a69ccbb00
16 changed files with 86 additions and 71 deletions
|
@ -100,7 +100,8 @@ func (c *convertCommand) Run(ctx context.Context, cd *simplecobra.Commandeer, ar
|
|||
return nil
|
||||
}
|
||||
|
||||
func (c *convertCommand) WithCobraCommand(cmd *cobra.Command) error {
|
||||
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.
|
||||
|
||||
|
@ -112,7 +113,7 @@ See convert's subcommands toJSON, toTOML and toYAML for more information.`
|
|||
return nil
|
||||
}
|
||||
|
||||
func (c *convertCommand) Init(cd, runner *simplecobra.Commandeer) error {
|
||||
func (c *convertCommand) PreRun(cd, runner *simplecobra.Commandeer) error {
|
||||
c.r = cd.Root.Command.(*rootCommand)
|
||||
cfg := config.New()
|
||||
cfg.Set("buildDrafts", true)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue