Skip to content

Instantly share code, notes, and snippets.

@konstantinmuenster
Created June 4, 2020 19:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save konstantinmuenster/a0bc54ac2a97a7ea87c21bb81ab2e0c7 to your computer and use it in GitHub Desktop.
Save konstantinmuenster/a0bc54ac2a97a7ea87c21bb81ab2e0c7 to your computer and use it in GitHub Desktop.
index.js (5) - How To Gatsby Portfolio
import React from "react"
import { graphql } from "gatsby"
import Layout from "../components/layout"
import Hero from "../components/hero"
const IndexPage = ({ data }) => {
return (
<Layout>
<Hero content={data.hero.edges[0].node} />
</Layout>
)
}
export default IndexPage
export const pageQuery = graphql`
{
hero: allMarkdownRemark {
edges {
node {
frontmatter {
title
greetings
emoji
subtitlePrefix
subtitleHighlight
}
rawMarkdownBody
}
}
}
}
`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment