{"action":"created","issue":{"url":"https://api.github.com/repos/jekyll/jekyll/issues/1934","repository_url":"https://api.github.com/repos/jekyll/jekyll","labels_url":"https://api.github.com/repos/jekyll/jekyll/issues/1934/labels{/name}","comments_url":"https://api.github.com/repos/jekyll/jekyll/issues/1934/comments","events_url":"https://api.github.com/repos/jekyll/jekyll/issues/1934/events","html_url":"https://github.com/jekyll/jekyll/issues/1934","id":25467052,"number":1934,"title":"page.layout should reflect the requested layout in all circumstances","user":{"login":"benbalter","id":282759,"avatar_url":"https://avatars.githubusercontent.com/u/282759?v=3","gravatar_id":"","url":"https://api.github.com/users/benbalter","html_url":"https://github.com/benbalter","followers_url":"https://api.github.com/users/benbalter/followers","following_url":"https://api.github.com/users/benbalter/following{/other_user}","gists_url":"https://api.github.com/users/benbalter/gists{/gist_id}","starred_url":"https://api.github.com/users/benbalter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benbalter/subscriptions","organizations_url":"https://api.github.com/users/benbalter/orgs","repos_url":"https://api.github.com/users/benbalter/repos","events_url":"https://api.github.com/users/benbalter/events{/privacy}","received_events_url":"https://api.github.com/users/benbalter/received_events","type":"User","site_admin":true},"labels":[{"url":"https://api.github.com/repos/jekyll/jekyll/labels/bug","name":"bug","color":"d41313"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/jekyll/jekyll/milestones/19","html_url":"https://github.com/jekyll/jekyll/milestones/3.0","labels_url":"https://api.github.com/repos/jekyll/jekyll/milestones/19/labels","id":547667,"number":19,"title":"3.0","description":null,"creator":{"login":"parkr","id":237985,"avatar_url":"https://avatars.githubusercontent.com/u/237985?v=3","gravatar_id":"","url":"https://api.github.com/users/parkr","html_url":"https://github.com/parkr","followers_url":"https://api.github.com/users/parkr/followers","following_url":"https://api.github.com/users/parkr/following{/other_user}","gists_url":"https://api.github.com/users/parkr/gists{/gist_id}","starred_url":"https://api.github.com/users/parkr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parkr/subscriptions","organizations_url":"https://api.github.com/users/parkr/orgs","repos_url":"https://api.github.com/users/parkr/repos","events_url":"https://api.github.com/users/parkr/events{/privacy}","received_events_url":"https://api.github.com/users/parkr/received_events","type":"User","site_admin":true},"open_issues":1,"closed_issues":62,"state":"closed","created_at":"2014-01-25T21:57:45Z","updated_at":"2015-10-29T22:25:45Z","due_on":null,"closed_at":"2015-10-29T22:24:08Z"},"comments":21,"created_at":"2014-01-12T18:21:18Z","updated_at":"2016-02-25T15:31:15Z","closed_at":null,"body":"If a layout itself has a layout, `page.layout` should still return the requested layout\r\n\r\n## Scenario\r\n\r\n* I have a blog with pages and posts\r\n* I have a layout called `default.html` with my header and footer\r\n* I have layouts called `post.html` and `page.html` which themselves specify `layout: default`\r\n* I want to know if the given thing I'm rendering is a page or a post, such as to add a class to the body tag via `{{ page.layout }}`\r\n\r\n## Expected\r\n\r\nThe post frontmatter says `layout: post`, I asked for `layout: post`, so when I query `layout`, return `post`\r\n\r\n## Actual\r\n\r\nThe last rendered layout is `default`, so `page.layout` will return `default` under all circomstances for both posts and pages\r\n\r\n## Screenshot\r\n\r\n![44791867](https://f.cloud.github.com/assets/282759/1896758/48127028-7bb6-11e3-8051-92de9cb5f018.jpg)\r\n"},"comment":{"url":"https://api.github.com/repos/jekyll/jekyll/issues/comments/188842160","html_url":"https://github.com/jekyll/jekyll/issues/1934#issuecomment-188842160","issue_url":"https://api.github.com/repos/jekyll/jekyll/issues/1934","id":188842160,"user":{"login":"axelfontaine","id":684824,"avatar_url":"https://avatars.githubusercontent.com/u/684824?v=3","gravatar_id":"","url":"https://api.github.com/users/axelfontaine","html_url":"https://github.com/axelfontaine","followers_url":"https://api.github.com/users/axelfontaine/followers","following_url":"https://api.github.com/users/axelfontaine/following{/other_user}","gists_url":"https://api.github.com/users/axelfontaine/gists{/gist_id}","starred_url":"https://api.github.com/users/axelfontaine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/axelfontaine/subscriptions","organizations_url":"https://api.github.com/users/axelfontaine/orgs","repos_url":"https://api.github.com/users/axelfontaine/repos","events_url":"https://api.github.com/users/axelfontaine/events{/privacy}","received_events_url":"https://api.github.com/users/axelfontaine/received_events","type":"User","site_admin":false},"created_at":"2016-02-25T15:31:15Z","updated_at":"2016-02-25T15:31:15Z","body":"+1"}}