Update Prettier

This commit is contained in:
Kyle Mathews 2017-09-03 16:26:40 -07:00
parent 769381a6e7
commit 772270376d
3 changed files with 16 additions and 22 deletions

View file

@ -32,7 +32,7 @@
},
"devDependencies": {
"gh-pages": "^0.12.0",
"prettier": "^1.5.3"
"prettier": "^1.6.1"
},
"homepage": "https://github.com/gatsbyjs/gatsby-starter-blog#readme",
"keywords": [

View file

@ -1,42 +1,38 @@
import React from "react"
import Link from "gatsby-link"
import get from "lodash/get"
import Helmet from "react-helmet"
import React from 'react'
import Link from 'gatsby-link'
import get from 'lodash/get'
import Helmet from 'react-helmet'
import Bio from "../components/Bio"
import { rhythm } from "../utils/typography"
import Bio from '../components/Bio'
import { rhythm } from '../utils/typography'
class BlogIndex extends React.Component {
render() {
const siteTitle = get(this, "props.data.site.siteMetadata.title")
const posts = get(this, "props.data.allMarkdownRemark.edges")
const siteTitle = get(this, 'props.data.site.siteMetadata.title')
const posts = get(this, 'props.data.allMarkdownRemark.edges')
return (
<div>
<Helmet title={get(this, "props.data.site.siteMetadata.title")} />
<Helmet title={get(this, 'props.data.site.siteMetadata.title')} />
<Bio />
{posts.map(post => {
if (post.node.path !== "/404/") {
const title = get(post, "node.frontmatter.title") || post.node.path
if (post.node.path !== '/404/') {
const title = get(post, 'node.frontmatter.title') || post.node.path
return (
<div
key={post.node.frontmatter.path}
>
<div key={post.node.frontmatter.path}>
<h3
style={{
marginBottom: rhythm(1 / 4),
}}
>
<Link
style={{ boxShadow: "none" }}
style={{ boxShadow: 'none' }}
to={post.node.frontmatter.path}
>
{post.node.frontmatter.title}
</Link>
</h3>
<small>
{post.node.frontmatter.date}
</small>
<small>{post.node.frontmatter.date}</small>
<p dangerouslySetInnerHTML={{ __html: post.node.excerpt }} />
</div>
)

View file

@ -14,9 +14,7 @@ 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),