Improve formatting of Hugo command descriptions

Trying to make them look good both in the terminal (`hugo help [command]`)
and in the web browser (http://gohugo.io/commands/).  :-)
This commit is contained in:
Anthony Fok
2015-08-04 03:15:12 -06:00
parent e64e571b67
commit f2ab0b2608
31 changed files with 432 additions and 388 deletions

View File

@@ -32,16 +32,18 @@ var unsafe bool
var convertCmd = &cobra.Command{
Use: "convert",
Short: "Convert will modify your content to different formats",
Long: `Convert will modify your content to different formats`,
Short: "Convert your content to different formats",
Long: `Convert your content (e.g. front matter) to different formats.
See convert's subcommands toJSON, toTOML and toYAML for more information.`,
Run: nil,
}
var toJSONCmd = &cobra.Command{
Use: "toJSON",
Short: "Convert front matter to JSON",
Long: `toJSON will convert all front matter in the content
directory to use JSON for the front matter`,
Long: `toJSON converts all front matter in the content directory
to use JSON for the front matter.`,
Run: func(cmd *cobra.Command, args []string) {
err := convertContents(rune([]byte(parser.JSON_LEAD)[0]))
if err != nil {
@@ -53,8 +55,8 @@ var toJSONCmd = &cobra.Command{
var toTOMLCmd = &cobra.Command{
Use: "toTOML",
Short: "Convert front matter to TOML",
Long: `toTOML will convert all front matter in the content
directory to use TOML for the front matter`,
Long: `toTOML converts all front matter in the content directory
to use TOML for the front matter.`,
Run: func(cmd *cobra.Command, args []string) {
err := convertContents(rune([]byte(parser.TOML_LEAD)[0]))
if err != nil {
@@ -66,8 +68,8 @@ var toTOMLCmd = &cobra.Command{
var toYAMLCmd = &cobra.Command{
Use: "toYAML",
Short: "Convert front matter to YAML",
Long: `toYAML will convert all front matter in the content
directory to use YAML for the front matter`,
Long: `toYAML converts all front matter in the content directory
to use YAML for the front matter.`,
Run: func(cmd *cobra.Command, args []string) {
err := convertContents(rune([]byte(parser.YAML_LEAD)[0]))
if err != nil {