-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Description
See https://discuss.gohugo.io/t/hugo-new-command-scrambles-front-matter/4682
Probably an issue with the new TOML lib. We should report it there, but a fix for this is more likely a proper fix for #452 -- which we may just have to do now.
I spent some time working out a good set of archetypes, with menu entries placed last.
However, "hugo new " scrambles the order of the fields badly.
For example, I have a review archetype:
+++
tags = ["review", "opinion"]
categories = ["reviews"]
type = "page"
[menu.main]
weight = 99
name = "menu name"
parent="parentid"
+++
If I run "hugo new page/writing/new_story.md" and then look at the file, it looks like this:
+++
categories
= ["reviews", ]
parent = "parentid'
[menu.main]
type = "page"
tags = ["review", "opinion"]
+++
Sometimes it is worse.
Any ideas?
Probably related to