diff --git a/src/pages/index.js b/src/pages/index.js index 3657232..99d2aae 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -10,11 +10,19 @@ import { rhythm } from '../utils/typography' class BlogIndex extends React.Component { render() { const siteTitle = get(this, 'props.data.site.siteMetadata.title') + const siteDescription = get( + this, + 'props.data.site.siteMetadata.description' + ) const posts = get(this, 'props.data.allMarkdownRemark.edges') return ( - + {posts.map(({ node }) => { const title = get(node, 'frontmatter.title') || node.fields.slug @@ -46,6 +54,7 @@ export const pageQuery = graphql` site { siteMetadata { title + description } } allMarkdownRemark(sort: { fields: [frontmatter___date], order: DESC }) { diff --git a/src/templates/blog-post.js b/src/templates/blog-post.js index 9e54c49..049ffcd 100644 --- a/src/templates/blog-post.js +++ b/src/templates/blog-post.js @@ -11,13 +11,15 @@ class BlogPostTemplate extends React.Component { render() { const post = this.props.data.markdownRemark const siteTitle = get(this.props, 'data.site.siteMetadata.title') + const siteDescription = post.excerpt const { previous, next } = this.props.pageContext return (

{post.frontmatter.title}