text: import React from 'react';
  import { graphql } from 'gatsby';
  
  import Layout from '../components/layout';
  import SEO from '../components/seo';
  
  class PageTemplate extends React.Component {
  
    render() {
      const page = this.props.data.markdownRemark;
      const siteTitle = this.props.data.site.siteMetadata.title;
  
      return (
        <Layout title={siteTitle}>
          <SEO title={page.frontmatter.title} />
          <h1>{page.frontmatter.title}</h1>
  
          <div dangerouslySetInnerHTML={{ __html: page.html }} />
        </Layout>
      );
    }
  }
  
  export default PageTemplate;
  
  export const pageQuery = graphql`
    query PageBySlug($slug: String!) {
      site {
        siteMetadata {
          title
        }
      }
      markdownRemark(fields: { slug: { eq: $slug } }) {
        id
        html
        frontmatter {
          title
        }
      }
    }
  `;
  
  