import React from 'react'; import Navbar from '../components/navbar'; import PaginationNav from '../components/pagination'; import Item from '../components/item'; import { graphql } from 'gatsby'; export default ({ data, pageContext }): JSX.Element => { const posts = data.allMdx.edges; const { currentPage, numPages, rootPath } = pageContext; return ( <> {posts.map(({ node: { id, frontmatter } }) => { return ( ); })} ); }; export const query = graphql` query ProjectsIndexQuery($skip: Int!, $limit: Int!) { allMdx( sort: { order: DESC, fields: [frontmatter___date] } filter: { fileAbsolutePath: { glob: "**/src/projects/*" } frontmatter: { hidden: { ne: true } } } limit: $limit skip: $skip ) { edges { node { excerpt(pruneLength: 250) frontmatter { title date(formatString: "YYYY-MM-DD") path subtitle } id } } } } `;