Update Prettier
This commit is contained in:
parent
769381a6e7
commit
772270376d
3 changed files with 16 additions and 22 deletions
|
|
@ -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>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue