text: import React from "react"
  import { Link } from "gatsby"
  import { graphql } from "gatsby"
  
  import Layout from "../components/layout"
  import SEO from "../components/seo"
  
  export default ({data}) => {
    return (
    <Layout>
      <SEO title="Home" />
      <h1>Blog</h1>
      {data.allMarkdownRemark.edges.map(({ node }) => (
        <div key={node.id}>
        <Link to={node.frontmatter.path}>{node.frontmatter.title}</Link>
        </div>
      ))}
    </Layout>
  )}
  
  export const query = graphql`
    query IndexQuery {
      allMarkdownRemark(sort: { fields: [frontmatter___date], order: DESC }) {
        totalCount
        edges {
          node {
            id
            frontmatter {
              title
              date(formatString: "DD MMMM, YYYY")
              path
            }
          }
        }
      }
    }
  `;