|
|
|
@ -25,6 +25,8 @@ import (
|
|
|
|
|
"github.com/pkg/errors"
|
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
|
"github.com/spf13/cobra/doc"
|
|
|
|
|
"golang.org/x/text/cases"
|
|
|
|
|
"golang.org/x/text/language"
|
|
|
|
|
|
|
|
|
|
"helm.sh/helm/v3/cmd/helm/require"
|
|
|
|
|
)
|
|
|
|
@ -84,7 +86,7 @@ func (o *docsOptions) run(out io.Writer) error {
|
|
|
|
|
hdrFunc := func(filename string) string {
|
|
|
|
|
base := filepath.Base(filename)
|
|
|
|
|
name := strings.TrimSuffix(base, path.Ext(base))
|
|
|
|
|
title := strings.Title(strings.Replace(name, "_", " ", -1))
|
|
|
|
|
title := cases.Title(language.Und).String(strings.Replace(name, "_", " ", -1))
|
|
|
|
|
return fmt.Sprintf("---\ntitle: \"%s\"\n---\n\n", title)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|