-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
61 lines (58 loc) · 1.43 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import React from 'react'
import { graphql } from 'gatsby'
import './index.css'
import Helmet from 'react-helmet'
import Layout from '../components/layout'
import BlogItem from '../components/blogItem'
import * as styles from './blog.module.css'
import Nav from '../components/nav'
const IndexPage = ({ data }) => {
return (
<div id="main">
<Helmet>
<meta charSet="utf-8" />
<title>Terrence Eisenhower - Developer</title>
<link rel="canonical" href="https://www.teisenhower.dev/" />
<meta name="author" content="Terrence Eisenhower" />
<meta
name="keywords"
content="web, developer, development, html, css, js, php, react, gatsby, blog"
/>
</Helmet>
<Layout>
<Nav />
<div id={styles.posts}>
{data.allMarkdownRemark.edges.map(({ node }, index) => {
return (
<BlogItem
key={node.frontmatter.title}
data={node}
index={index}
/>
)
})}
</div>
</Layout>
</div>
)
}
export default IndexPage
export const query = graphql`
query {
allMarkdownRemark(sort: { order: DESC, fields: frontmatter___date }) {
edges {
node {
id
frontmatter {
title
date
longdate
}
fields {
slug
}
}
}
}
}
`