summaryrefslogtreecommitdiffstats
path: root/commands/convert.go
diff options
context:
space:
mode:
Diffstat (limited to 'commands/convert.go')
-rw-r--r--commands/convert.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/commands/convert.go b/commands/convert.go
index 0cae5ad7e..e5c367913 100644
--- a/commands/convert.go
+++ b/commands/convert.go
@@ -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)