{"action":"created","issue":{"url":"https://api.github.com/repos/netlify/netlify-cms/issues/28","labels_url":"https://api.github.com/repos/netlify/netlify-cms/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/netlify/netlify-cms/issues/28/comments","events_url":"https://api.github.com/repos/netlify/netlify-cms/issues/28/events","html_url":"https://github.com/netlify/netlify-cms/issues/28","id":116223819,"number":28,"title":"Jekyll layout template","user":{"login":"nifl","id":698373,"avatar_url":"https://avatars.githubusercontent.com/u/698373?v=3","gravatar_id":"","url":"https://api.github.com/users/nifl","html_url":"https://github.com/nifl","followers_url":"https://api.github.com/users/nifl/followers","following_url":"https://api.github.com/users/nifl/following{/other_user}","gists_url":"https://api.github.com/users/nifl/gists{/gist_id}","starred_url":"https://api.github.com/users/nifl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nifl/subscriptions","organizations_url":"https://api.github.com/users/nifl/orgs","repos_url":"https://api.github.com/users/nifl/repos","events_url":"https://api.github.com/users/nifl/events{/privacy}","received_events_url":"https://api.github.com/users/nifl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-10T23:11:22Z","updated_at":"2015-11-10T23:56:10Z","closed_at":null,"body":"Specifying a layout template per content type isn't clear in the README. For example, Jekyll frontmatter for a post should include `layout: post`. This isn't being generated with new posts. How should this configuration be made?"},"comment":{"url":"https://api.github.com/repos/netlify/netlify-cms/issues/comments/155606599","html_url":"https://github.com/netlify/netlify-cms/issues/28#issuecomment-155606599","issue_url":"https://api.github.com/repos/netlify/netlify-cms/issues/28","id":155606599,"user":{"login":"biilmann","id":6515,"avatar_url":"https://avatars.githubusercontent.com/u/6515?v=3","gravatar_id":"","url":"https://api.github.com/users/biilmann","html_url":"https://github.com/biilmann","followers_url":"https://api.github.com/users/biilmann/followers","following_url":"https://api.github.com/users/biilmann/following{/other_user}","gists_url":"https://api.github.com/users/biilmann/gists{/gist_id}","starred_url":"https://api.github.com/users/biilmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biilmann/subscriptions","organizations_url":"https://api.github.com/users/biilmann/orgs","repos_url":"https://api.github.com/users/biilmann/repos","events_url":"https://api.github.com/users/biilmann/events{/privacy}","received_events_url":"https://api.github.com/users/biilmann/received_events","type":"User","site_admin":false},"created_at":"2015-11-10T23:56:09Z","updated_at":"2015-11-10T23:56:09Z","body":"There's two ways to do it.\r\n\r\nOne is Jekyll specific and consists of setting a global layout for the post collection, you can see an example of that here:\r\n\r\nhttps://github.com/netlify/netlify-home/blob/master/_config.yml#L33\r\n\r\nThe other option works for any hidden field, and it's based on adding a hidden widget with a default value to the fields:\r\n\r\n```yml\r\ncollections: # A list of collections the CMS should be able to edit\r\n  - name: \"post\" # Used in routes, ie.: /admin/collections/:slug/edit\r\n    label: \"Post\" # Used in the UI, ie.: \"New Post\"\r\n    folder: \"_posts\" # The path to the folder where the documents are stored\r\n    create: true # Allow users to create new documents in this collection\r\n    fields: # The fields each document in this collection have\r\n      - {label: \"Title\", name: \"title\", widget: \"string\", tagname: \"h1\"}\r\n      - {label: \"Body\", name: \"body\", widget: \"markdown\"}\r\n      - {label: \"Layout\", name: \"layout\", widget: \"hidden\", default: \"post\"}\r\n```"}}