Upgrade to 1.0-alpha16

This commit is contained in:
Kyle Mathews 2017-05-26 10:46:52 +01:00
parent 11e1d019cb
commit 4f47229cb6
4 changed files with 38 additions and 36 deletions

View file

@ -23,7 +23,7 @@ class BlogIndex extends React.Component {
marginBottom: rhythm(1 / 4),
}}
>
<Link style={{ boxShadow: "none" }} to={post.node.slug}>
<Link style={{ boxShadow: "none" }} to={post.node.fields.slug}>
{post.node.frontmatter.title}
</Link>
</li>
@ -59,7 +59,9 @@ query IndexQuery {
allMarkdownRemark {
edges {
node {
slug
fields {
slug
}
frontmatter {
title
}

View file

@ -6,11 +6,10 @@ import get from "lodash/get"
import Bio from "../components/Bio"
import { rhythm, scale } from "../utils/typography"
class BlogPostRoute extends React.Component {
class BlogPostTemplate extends React.Component {
render() {
const post = this.props.data.markdownRemark
const siteTitle = get(this.props, "data.site.siteMetadata.title")
// console.log(this.props)
return (
<div>
@ -38,7 +37,7 @@ class BlogPostRoute extends React.Component {
}
}
export default BlogPostRoute
export default BlogPostTemplate
export const pageQuery = graphql`
query BlogPostByPath($slug: String!) {
@ -48,7 +47,7 @@ export const pageQuery = graphql`
author
}
}
markdownRemark(slug: { eq: $slug }) {
markdownRemark(fields: { slug: { eq: $slug }}) {
id
html
frontmatter {