-
-
Save christiannwamba/72d92e1872723d9e6536da69552d6a4e 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
... | |
export default ({ data }) => { | |
console.log(data) | |
return ( | |
<div> | |
<h4> | |
{data.allMarkdownRemark.totalCount} Posts | |
</h4> | |
{data.allMarkdownRemark.edges.map(({ node }) => | |
<div key={node.id}> | |
<Link | |
to={node.fields.slug} | |
style={{ textDecoration: `none`, color: `inherit` }} | |
> | |
<h2> | |
{node.frontmatter.title}{" "} | |
<span style={{color:`grey`, fontSize:`0.7em`}}>— {node.frontmatter.date}</span> | |
</h2> | |
<p> | |
{node.excerpt} | |
</p> | |
<h5> | |
By {node.frontmatter.author} | |
</h5> | |
</Link> | |
</div> | |
)} | |
</div> | |
) | |
} | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment