create = async ({ root }, { name, value }) => {
  const release = await lock(`gatsby-config.js`)
  const configSrc = await readConfigFile(root)
  const prettierConfig = await prettier.resolveConfig(root)

  let code = addFieldToSiteMetadata(configSrc, { name, value })
  code = prettier.format(code, { ...prettierConfig, parser: `babel` })

  await fs.writeFile(getConfigPath(root), code)

  const resource = await read({ root }, name)
  release()
  return resource
}
Configure your Gatsby site with this file.

See: https://www.gatsbyjs.com/docs/gatsby-config/