-
-
Save canertuzunar/b3d6a0fcb80e4e5d92af7a659931c9a1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//src/pages/index.js | |
import React from 'react' | |
import { graphql, Link } from 'gatsby' | |
export default function IndexPage({data}) { | |
return( | |
<> | |
<h1>Gatsby Blog</h1> | |
<h3>this project created for provide resource to this <a href="https://www.notion.so/tuzunarcaner/Statik-Web-Sitesi-ve-Gatsby-JS-f2a902d281b04c8cb3b0ac97ef49fdf5"> | |
article | |
</a></h3> | |
<ul> | |
{ | |
data.allMarkdownRemark.edges.map(({node}) => { | |
return <li> | |
<Link to={node.fields.slug}> {node.frontmatter.title} </Link> | |
</li> | |
}) | |
} | |
</ul> | |
</> | |
) | |
} | |
export const query = graphql` | |
query HomeQuery { | |
allMarkdownRemark(filter: {fileAbsolutePath: {regex: "/blog/"}}) { | |
edges { | |
node { | |
fields { | |
slug | |
} | |
frontmatter{ | |
title | |
} | |
} | |
} | |
} | |
} | |
` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment