Skip to content

Instantly share code, notes, and snippets.

@konstantinmuenster
Created June 4, 2020 19:36
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/ee0622b5d11f19e851ce40176cc87157 to your computer and use it in GitHub Desktop.
Save konstantinmuenster/ee0622b5d11f19e851ce40176cc87157 to your computer and use it in GitHub Desktop.
hero.js (2) - How To Gatsby Portfolio
...
const Hero = ({ content }) => {
const { frontmatter, rawMarkdownBody } = content
return (
<StyledSection id="hero">
<h1 className="title">
{frontmatter.greetings}{" "}
<span role="img" aria-label="emoji">
{frontmatter.emoji}
</span>
<br />
{frontmatter.title}
</h1>
<h2 className="subtitle">
{frontmatter.subtitlePrefix}{" "}
<span className="highlighted">{frontmatter.subtitleHighlight}</span>
</h2>
<div className="description">{rawMarkdownBody}</div>
</StyledSection>
)
}
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment