Custom frontmatter variables with Markdown Remark in Gatsby.js : <p>I am building a website using Gatsbyjs and NetlifyCMS. I've started using this starter <a href="https://github.com/AustinGreen/gatsby-starter-netlify-cms" rel="noreferrer">https://github.com/AustinGreen/gatsby-starter-netlify-cms</a>, and I am trying to customise it now.</p>

<p>I want to use custom variables in the frontmatter of a markdown file like this:</p>

<pre><code>---
templateKey: mirror
nazev: Černobílá
title: Black and White
cena: '2700'
price: '108'
thumbnail: /img/img_1659.jpeg
---
</code></pre>

<p>I want to acess this data with GraphQL. I use gatsby-source-filesystem and gatsby-transform-remark. This is my query:</p>

<pre><code>  {
  allMarkdownRemark {
    edges {
      node {
        frontmatter {
          templateKey
          nazev
          title
          cena
          price
        }
      }
    }
  }
}
</code></pre>

<p>I can't get the GraphQL to read my own variables, it recognises only <code>title</code> and <code>templateKey</code> (those, that were already used in the starter). I get this error:</p>

<pre><code>{
  "errors": [
    {
      "message": "Cannot query field \"nazev\" on type \"frontmatter_2\".",
      "locations": [
        {
          "line": 7,
          "column": 11
        }
      ]
    },
    {
      "message": "Cannot query field \"cena\" on type \"frontmatter_2\".",
      "locations": [
        {
          "line": 9,
          "column": 11
        }
      ]
    },
    {
      "message": "Cannot query field \"price\" on type \"frontmatter_2\". Did you mean \"pricing\"?",
      "locations": [
        {
          "line": 10,
          "column": 11
        }
      ]
    }
  ]
}
</code></pre>

<p>I've searched for days, but found nothing. Would someone help me please?</p>
