{"size": 623, "ext": "js", "max_stars_repo_path": "src/templates/post.js", "max_stars_repo_name": "huntercaron/ContentBlocks", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/templates/post.js", "max_issues_repo_name": "huntercaron/ContentBlocks", "max_issues_repo_issues_event_min_datetime": "2021-09-01T18:27:55.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-26T14:51:21.000Z", "max_forks_repo_path": "src/templates/post.js", "max_forks_repo_name": "huntercaron/ContentBlocks", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 5, "max_forks_count": null, "avg_line_length": 16.3947368421, "max_line_length": 64, "alphanum_fraction": 0.6035313002}
import React from 'react';
import styled from 'styled-components'


// styled-components
const Content = styled.div`
  p {
    max-width: 500px;
  }
`


// page template component
export default function Post({ data }) {
  const post = data.markdownRemark;

  return (
    <div>
      <h3>{post.title}</h3>
      <Content dangerouslySetInnerHTML={{ __html: post.html }}/>
    </div>
  );
};


// template query
export const aboutPageQuery = graphql`
  query PostPage($path: String!) {
    markdownRemark(frontmatter: { path: { eq: $path } }) {
      html
      frontmatter {
        path
        title
      }
    }
  }
`;
