在盖茨比博客的前言中使用映射的映射

时间:2019-05-18 23:32:21

标签: gatsby yaml-front-matter

通过以下方式生成了gatsby入门博客:

gatsby new my-blog-starter https://github.com/gatsbyjs/gatsby-starter-blog

我已将以下映射映射添加到hello world index.md的最前面(根据此处的YAML规范的示例2.6:https://yaml.org/spec/1.2/spec.html进行修改)。

test: {hr: 65, avg: 0.278}

但是,运行以下GraphQL查询会返回错误。如何在不返回错误的情况下将映射映射添加到前题?

{
  allMarkdownRemark {
    edges {
      node {
        frontmatter {
          test
        }
      }
    }
  }
}

0 个答案:

没有答案