{"action":"opened","issue":{"url":"https://api.github.com/repos/spf13/hugo/issues/2745","repository_url":"https://api.github.com/repos/spf13/hugo","labels_url":"https://api.github.com/repos/spf13/hugo/issues/2745/labels{/name}","comments_url":"https://api.github.com/repos/spf13/hugo/issues/2745/comments","events_url":"https://api.github.com/repos/spf13/hugo/issues/2745/events","html_url":"https://github.com/spf13/hugo/issues/2745","id":191959313,"number":2745,"title":"Garbled TOML archetype parsing","user":{"login":"bep","id":394382,"avatar_url":"https://avatars.githubusercontent.com/u/394382?v=3","gravatar_id":"","url":"https://api.github.com/users/bep","html_url":"https://github.com/bep","followers_url":"https://api.github.com/users/bep/followers","following_url":"https://api.github.com/users/bep/following{/other_user}","gists_url":"https://api.github.com/users/bep/gists{/gist_id}","starred_url":"https://api.github.com/users/bep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bep/subscriptions","organizations_url":"https://api.github.com/users/bep/orgs","repos_url":"https://api.github.com/users/bep/repos","events_url":"https://api.github.com/users/bep/events{/privacy}","received_events_url":"https://api.github.com/users/bep/received_events","type":"User","site_admin":false},"labels":[{"id":46429356,"url":"https://api.github.com/repos/spf13/hugo/labels/kind/bug","name":"kind/bug","color":"D49392","default":false}],"state":"open","locked":false,"assignee":{"login":"bep","id":394382,"avatar_url":"https://avatars.githubusercontent.com/u/394382?v=3","gravatar_id":"","url":"https://api.github.com/users/bep","html_url":"https://github.com/bep","followers_url":"https://api.github.com/users/bep/followers","following_url":"https://api.github.com/users/bep/following{/other_user}","gists_url":"https://api.github.com/users/bep/gists{/gist_id}","starred_url":"https://api.github.com/users/bep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bep/subscriptions","organizations_url":"https://api.github.com/users/bep/orgs","repos_url":"https://api.github.com/users/bep/repos","events_url":"https://api.github.com/users/bep/events{/privacy}","received_events_url":"https://api.github.com/users/bep/received_events","type":"User","site_admin":false},"assignees":[{"login":"bep","id":394382,"avatar_url":"https://avatars.githubusercontent.com/u/394382?v=3","gravatar_id":"","url":"https://api.github.com/users/bep","html_url":"https://github.com/bep","followers_url":"https://api.github.com/users/bep/followers","following_url":"https://api.github.com/users/bep/following{/other_user}","gists_url":"https://api.github.com/users/bep/gists{/gist_id}","starred_url":"https://api.github.com/users/bep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bep/subscriptions","organizations_url":"https://api.github.com/users/bep/orgs","repos_url":"https://api.github.com/users/bep/repos","events_url":"https://api.github.com/users/bep/events{/privacy}","received_events_url":"https://api.github.com/users/bep/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/spf13/hugo/milestones/11","html_url":"https://github.com/spf13/hugo/milestones/v0.18","labels_url":"https://api.github.com/repos/spf13/hugo/milestones/11/labels","id":2010400,"number":11,"title":"v0.18","description":"","creator":{"login":"anthonyfok","id":1274764,"avatar_url":"https://avatars.githubusercontent.com/u/1274764?v=3","gravatar_id":"","url":"https://api.github.com/users/anthonyfok","html_url":"https://github.com/anthonyfok","followers_url":"https://api.github.com/users/anthonyfok/followers","following_url":"https://api.github.com/users/anthonyfok/following{/other_user}","gists_url":"https://api.github.com/users/anthonyfok/gists{/gist_id}","starred_url":"https://api.github.com/users/anthonyfok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anthonyfok/subscriptions","organizations_url":"https://api.github.com/users/anthonyfok/orgs","repos_url":"https://api.github.com/users/anthonyfok/repos","events_url":"https://api.github.com/users/anthonyfok/events{/privacy}","received_events_url":"https://api.github.com/users/anthonyfok/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":24,"state":"open","created_at":"2016-09-17T03:34:55Z","updated_at":"2016-11-28T09:43:07Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2016-11-28T09:43:07Z","updated_at":"2016-11-28T09:43:07Z","closed_at":null,"body":"See https://discuss.gohugo.io/t/hugo-new-command-scrambles-front-matter/4682\r\n\r\nProbably 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.\r\n\r\n\r\n```\r\n\r\nI spent some time working out a good set of archetypes, with menu entries placed last.\r\nHowever, \"hugo new \" scrambles the order of the fields badly.\r\n\r\nFor example, I have a review archetype:\r\n\r\n+++\r\ntags = [\"review\", \"opinion\"]\r\ncategories = [\"reviews\"]\r\ntype = \"page\"\r\n[menu.main]\r\nweight = 99\r\nname = \"menu name\"\r\nparent=\"parentid\"\r\n+++\r\n\r\nIf I run \"hugo new page/writing/new_story.md\" and then look at the file, it looks like this:\r\n\r\n+++\r\n\r\ncategories\r\n= [\"reviews\", ]\r\nparent = \"parentid'\r\n[menu.main]\r\ntype = \"page\"\r\ntags = [\"review\", \"opinion\"]\r\n\r\n+++\r\n\r\nSometimes it is worse.\r\n\r\nAny ideas?\r\n```\r\n\r\nProbably related to "}}
{"actor":{"display_login":"bep"}}