import React from 'react';
import Helmet from 'react-helmet';
import Post from '../components/Post';
import Sidebar from '../components/Sidebar';
class IndexRoute extends React.Component {
render() {
const items = [];
const { title, subtitle } = this.props.data.site.siteMetadata;
const posts = this.props.data.allMarkdownRemark.edges;
posts.forEach((post) => {
items.push();
});
return (
);
}
}
export default IndexRoute;
export const pageQuery = graphql`
query IndexQuery {
site {
siteMetadata {
title
subtitle
copyright
menu {
label
path
}
author {
name
email
telegram
twitter
github
rss
vk
}
}
}
allMarkdownRemark(
limit: 1000,
filter: { frontmatter: { layout: { eq: "post" }, draft: { ne: true } } },
sort: { order: DESC, fields: [frontmatter___date] }
){
edges {
node {
fields {
slug
categorySlug
}
frontmatter {
title
date
category
description
}
}
}
}
}
`;