Repository: gohugoio/hugo (language: go)

Issue:
hugo new content ignores the --format option
<!--
Please do not use the issue queue for questions or troubleshooting. Unless you are certain that your issue is a software defect, use the forum:

https://discourse.gohugo.io
-->

<!-- Please answer these questions before submitting your issue. Thanks! -->

### What version of Hugo are you using (`hugo version`)?
0.118.2

### Does this issue reproduce with the latest release?
yes

hugo new content --format yaml still produces +++ for the front matter instead of YAML's ---



Discussion / hints:
Although this flag has been erroneously available when generating new content, it has never had any effect. The flag should be removed from the `hugo new content` command. 
> Although this flag has been erroneously available when generating new content, it has never had any effect. The flag should be removed from the `hugo new content` command.

If this is the case, how do you generate new content so that it uses YAML for its front matter if you have used `--format yaml` when generating the site?
You can have as many archetypes as you want, using different front matter formats, etc.
> You can have as many archetypes as you want, using different front matter formats, etc.

That I understand, but if I used the `--format yaml` flag when generating the site with the `hugo new site` command,  shouldn't the `default.md` also be in YAML, not TOML?
That flag only applies to the configuration format. That is the way it has always behaved.

Fix patch:
diff --git a/commands/new.go b/commands/new.go
index ffd75b2bbb4..8e348366dd8 100644
--- a/commands/new.go
+++ b/commands/new.go
@@ -63,7 +63,6 @@ Ensure you run this within the root directory of your site.`,
 					cmd.Flags().StringVarP(&contentType, "kind", "k", "", "content type to create")
 					cmd.Flags().String("editor", "", "edit new content with this editor, if provided")
 					cmd.Flags().BoolVarP(&force, "force", "f", false, "overwrite file if it already exists")
-					cmd.Flags().StringVar(&format, "format", "toml", "preferred file format (toml, yaml or json)")
 					applyLocalFlagsBuildConfig(cmd, r)
 
 				},
diff --git a/docs/content/en/commands/hugo_new_content.md b/docs/content/en/commands/hugo_new_content.md
index dd646766b81..cc53346ad0d 100644
--- a/docs/content/en/commands/hugo_new_content.md
+++ b/docs/content/en/commands/hugo_new_content.md
@@ -30,7 +30,6 @@ hugo new content [path] [flags]
   -c, --contentDir string   filesystem path to content directory
       --editor string       edit new content with this editor, if provided
   -f, --force               overwrite file if it already exists
-      --format string       preferred file format (toml, yaml or json) (default "toml")
   -h, --help                help for content
   -k, --kind string         content type to create
   -t, --theme strings       themes to use (located in /themes/THEMENAME/)


Test patch: