text: import React from "react"
  import Link from 'gatsby-link'
  
  export default ({ data }) => {
    const post = data.markdownRemark
    return (
      <div>
        <h1>{post.frontmatter.title}</h1>
        <div dangerouslySetInnerHTML={{ __html: post.html}} />
        <Link to="/">Go back to the homepage</Link>
      </div>
    )
  }
  
  export const query = graphql `
    query BlogPostQuery($slug: String) {
      markdownRemark(fields: { slug: { eq: $slug } }) {
        html
        frontmatter {
          title
        }
      }
    }
  `
  