import React from "react"; import Navbar from "../components/navbar"; import { graphql } from "gatsby"; import style from "./notes.module.css"; export default ({ data }) => { console.log(data); const posts = data.allMdx.edges; return <> { posts.map(({ node }) => { return

{node.frontmatter.title}

{node.excerpt}

; }) } ; }; export const query = graphql` query IndexQuery { allMdx(sort: {order: ASC, fields: [fileAbsolutePath]}, filter: {fileAbsolutePath: {glob: "**/src/notes/*"}}) { edges { node { excerpt(pruneLength: 250) frontmatter { title date(formatString: "YYYY-MM-DD") path } id } } } } `;