update to use cobra's sub package doc

This commit is contained in:
Steve Francia
2015-12-24 09:47:00 -05:00
parent a291f3c5d9
commit 1d6286b094
2 changed files with 10 additions and 7 deletions

View File

@@ -15,14 +15,16 @@ package commands
import (
"fmt"
"github.com/spf13/cobra"
"github.com/spf13/hugo/helpers"
"github.com/spf13/hugo/hugofs"
jww "github.com/spf13/jwalterweatherman"
"path"
"path/filepath"
"strings"
"time"
"github.com/spf13/cobra"
"github.com/spf13/cobra/doc"
"github.com/spf13/hugo/helpers"
"github.com/spf13/hugo/hugofs"
jww "github.com/spf13/jwalterweatherman"
)
const gendocFrontmatterTemplate = `---
@@ -67,7 +69,7 @@ for rendering in Hugo.`,
}
jww.FEEDBACK.Println("Generating Hugo command-line documentation in", gendocdir, "...")
cobra.GenMarkdownTreeCustom(cmd.Root(), gendocdir, prepender, linkHandler)
doc.GenMarkdownTreeCustom(cmd.Root(), gendocdir, prepender, linkHandler)
jww.FEEDBACK.Println("Done.")
return nil