text: let siteConfig
  let ghostConfig
  
  try {
      siteConfig = require(`./siteConfig`)
  } catch (e) {
      siteConfig = null
  }
  
  try {
      ghostConfig = require(`./.ghost`)
  } catch (e) {
      ghostConfig = {
          development: {
              apiUrl: process.env.GHOST_API_URL,
              contentApiKey: process.env.GHOST_CONTENT_API_KEY,
          },
          production: {
              apiUrl: process.env.GHOST_API_URL,
              contentApiKey: process.env.GHOST_CONTENT_API_KEY,
          },
      }
  } finally {
      const { apiUrl, contentApiKey } = process.env.NODE_ENV === `development` ? ghostConfig.development : ghostConfig.production
  
      if (!apiUrl || !contentApiKey || contentApiKey.match(/<key>/)) {
          ghostConfig = null //allow default config to take over
      }
  }
  
  module.exports = {
      plugins: [
          { 
              resolve: `gatsby-theme-try-ghost`,
              options: {
                  ghostConfig: ghostConfig,
                  siteConfig: siteConfig,
              } 
          }
      ],
  }
  