-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hugo new content ignores the --format option #11462
Comments
Although this flag has been erroneously available when generating new content, it has never had any effect. The flag should be removed from the |
If this is the case, how do you generate new content so that it uses YAML for its front matter if you have used |
You can have as many archetypes as you want, using different front matter formats, etc. |
That I understand, but if I used the |
That flag only applies to the configuration format. That is the way it has always behaved. |
I am also interested in this. I have created the site with format YAML and it correctly creates a YAML config, but when I create a post it always defaults to TOML front matter. I have tried specifying |
I am still confused as to how can we create content with YAML front matter? I can open another issue, but maybe there is a simple answer? As it stands it will always create TOML. thank you |
Content gets created based on archetype templates and Hugo will use whatever front matter format these uses. |
Might be a good idea for hugo to output to the console a message that you need to change your archetype templates to YAML manually when the user generates their site with |
@jtcmedia there is no such flag anymore for |
that's clarified it, thank you |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
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 ---
The text was updated successfully, but these errors were encountered: