Just use frontmatter paths for paths + cleanups

This commit is contained in:
Kyle Mathews 2017-07-04 10:49:13 -07:00
parent 4936e80940
commit d2e2bc8df7
6 changed files with 33 additions and 63 deletions

View file

@ -14,7 +14,9 @@ class BlogPostTemplate extends React.Component {
return (
<div>
<Helmet title={`${post.frontmatter.title} | ${siteTitle}`} />
<h1>{post.frontmatter.title}</h1>
<h1>
{post.frontmatter.title}
</h1>
<p
style={{
...scale(-1 / 5),
@ -40,14 +42,14 @@ class BlogPostTemplate extends React.Component {
export default BlogPostTemplate
export const pageQuery = graphql`
query BlogPostByPath($slug: String!) {
query BlogPostByPath($path: String!) {
site {
siteMetadata {
title
author
}
}
markdownRemark(fields: { slug: { eq: $slug }}) {
markdownRemark(frontmatter: { path: { eq: $path } }) {
id
html
frontmatter {