title: Render markdown/HTML from frontmatter in a Gatsby NetlifyCMS project
body: <p>NetlifyCMS offers a markdown editor that allows the insertion of markdown (and code blocks) within frontmatter. </p>
  
  <p>The resulting markdown file might have content like: </p>
  
  <pre><code>---
  featureSubtitle: |-
    ![fdsaf](/img/cdc-w9keokhajkw-unsplash.jpg "blah")
  
    # Markdown H1
  
    ## Markdown H2
  
  
    &lt;h1&gt;Test&lt;/h1&gt;
    &lt;p&gt;Paragraph&lt;/p&gt;
  ---
  </code></pre>
  
  <p>This is then loaded onto the page from frontmatter via a graphql query like: </p>
  
  <pre><code>export const pageQuery = graphql`
    query FeaturePageByID($id: String!) {
      markdownRemark(id: { eq: $id }) {
        id
        html
        frontmatter {
          title
          description
          featureSubtitle
        }
      }
    }
  `;
  </code></pre>
  
  <p>and </p>
  
  <pre><code>{featureSubtitle &amp;&amp; featureSubtitle ? (
                    &lt;div
                      dangerouslySetInnerHTML={{ __html: featureSubtitle }}
                    /&gt;
                  ) : null}
  
  </code></pre>
  
  <p>This however appears to render the HTML correctly, but not the markdown. </p>
  
  <p><a href="https://i.stack.imgur.com/ABomW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ABomW.png" alt="enter image description here"></a></p>