mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-15 20:44:01 +02:00
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:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user