{"action":"opened","issue":{"url":"https://api.github.com/repos/ChristopherBiscardi/gatsby-mdx/issues/17","repository_url":"https://api.github.com/repos/ChristopherBiscardi/gatsby-mdx","labels_url":"https://api.github.com/repos/ChristopherBiscardi/gatsby-mdx/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/ChristopherBiscardi/gatsby-mdx/issues/17/comments","events_url":"https://api.github.com/repos/ChristopherBiscardi/gatsby-mdx/issues/17/events","html_url":"https://github.com/ChristopherBiscardi/gatsby-mdx/issues/17","id":344539858,"node_id":"MDU6SXNzdWUzNDQ1Mzk4NTg=","number":17,"title":"Frontmatter as PageContext","user":{"login":"avigoldman","id":4924860,"node_id":"MDQ6VXNlcjQ5MjQ4NjA=","avatar_url":"https://avatars1.githubusercontent.com/u/4924860?v=4","gravatar_id":"","url":"https://api.github.com/users/avigoldman","html_url":"https://github.com/avigoldman","followers_url":"https://api.github.com/users/avigoldman/followers","following_url":"https://api.github.com/users/avigoldman/following{/other_user}","gists_url":"https://api.github.com/users/avigoldman/gists{/gist_id}","starred_url":"https://api.github.com/users/avigoldman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avigoldman/subscriptions","organizations_url":"https://api.github.com/users/avigoldman/orgs","repos_url":"https://api.github.com/users/avigoldman/repos","events_url":"https://api.github.com/users/avigoldman/events{/privacy}","received_events_url":"https://api.github.com/users/avigoldman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-25T17:37:41Z","updated_at":"2018-07-25T17:37:41Z","closed_at":null,"author_association":"COLLABORATOR","body":"What do you think of adding the frontmatter automatically as `pageContext`? That way you could use those values in the GraphQL queries or just render them out in the Layout.\r\n\r\nIn `pages/index.mdx`\r\n```js\r\n---\r\ntitle: \"My post title\"\r\n---\r\n\r\nWelcome to my blog.\r\n\r\n\r\nexport default ({ pageContext, children }) => (\r\n  <div>\r\n    <h1>{pageContext.title}</h1>\r\n    {children}\r\n  </div>\r\n)\r\n```"}}
{"actor":{"display_login":"avigoldman"}}