text: 
  module.exports = {
    siteMetadata: {
      title: "Khalil Stemmler | Advanced TypeScript & Node.js best practices for large-scale applications",
      description: `Advanced TypeScript & Node.js best practices for large-scale applications. Learn to write flexible, maintainable software.`,
      author: `Khalil Stemmler`,
      twitter: 'https://twitter.com/stemmlerjs',
      siteUrl: 'https://khalilstemmler.com',
      logo: 'https://khalilstemmler.com/img/banner/banner.png',
      repo: 'https://github.com/stemmlerjs/khalilstemmler-website-2019'
    },
    plugins: [
      `gatsby-plugin-styled-components`,
      {
        resolve: `gatsby-plugin-sitemap`,
        options: {
          exclude: ["/resources/*", `/best`],
        }
      },
      {
        resolve: `gatsby-plugin-typography`,
        options: {
          pathToConfigModule: `src/utils/typography`,
        },
      },
      `gatsby-plugin-sass`,
      `gatsby-plugin-react-helmet`,
      {
        resolve: `gatsby-plugin-feed`,
        options: {
          query: `
            {
              site {
                siteMetadata {
                  title
                  description
                  siteUrl
                  site_url: siteUrl
                }
              }
            }
          `,
          feeds: [
            {
              serialize: ({ query: { site, allMarkdownRemark } }) => {
                console.log('constructing rss')
                return allMarkdownRemark.edges.map(edge => {
                  return Object.assign({}, edge.node.frontmatter, {
                    description: edge.node.excerpt,
                    date: edge.node.frontmatter.date,
                    url: site.siteMetadata.siteUrl + edge.node.fields.slug,
                    guid: site.siteMetadata.siteUrl + edge.node.fields.slug,
                    custom_elements: [{ "content:encoded": edge.node.html }],
                  })
                })
              },
              query: `
                {
                  allMarkdownRemark(
                    sort: { order: DESC, fields: [frontmatter___date] },
                    filter: { 
                      frontmatter: { 
                        published: { eq: true }  
                      } 
                    }
                  ) {
                    edges {
                      node {
                        excerpt
                        html
                        fields { slug }
                        frontmatter {
                          title
                          date
                        }
                      }
                    }
                  }
                }
              `,
              output: "/rss.xml",
              title: "khalilstemmler.com RSS Feed",
              // optional configuration to insert feed reference in pages:
              // if `string` is used, it will be used to create RegExp and then test if pathname of
              // current page satisfied this regular expression;
              // if not provided or `undefined`, all pages will have feed reference inserted
              match: "^(blog|articles)",
            },
          ],
        },
      },
      {
        resolve: "gatsby-plugin-google-tagmanager",
        options: {
          id: "GTM-NRKVKR2",
    
          // Include GTM in development.
          // Defaults to false meaning GTM will only be loaded in production.
          includeInDevelopment: false,
    
          // datalayer to be set before GTM is loaded
          // should be an object or a function that is executed in the browser
          // Defaults to null
          defaultDataLayer: { platform: "gatsby" },
        },
      },
      {
        resolve: `gatsby-source-filesystem`,
        options: {
          name: `media`,
          path: `${__dirname}/static/media`,
          ignore: process.env.NODE_ENV === 'production' && [`**/examples/**/.js`]
        },
      },
      {
        resolve: `gatsby-source-filesystem`,
        options: {
          name: `images`,
          path: `${__dirname}/src/images`,
        },
      },
      {
        resolve: "gatsby-plugin-web-font-loader",
        options: {
          custom: {
            families: ["TripletCGBlack"],
            urls: ["/fonts/fonts.css"],
          },
        },
      },
      `gatsby-transformer-sharp`,
      `gatsby-plugin-sharp`,
      {
        resolve: `gatsby-plugin-manifest`,
        options: {
          name: `gatsby-starter-default`,
          short_name: `starter`,
          start_url: `/`,
          background_color: `#7DE77B`,
          theme_color: `#7DE77B`,
          display: `minimal-ui`,
          icon: `src/images/favicon.png`, // This path is relative to the root of the site.
        },
      },
      {
        resolve: `gatsby-source-filesystem`,
        options: {
          path: `${__dirname}/src/pages`,
          name: "markdown-pages",
        },
      },
      `gatsby-transformer-remark`,
      {
        resolve: "gatsby-transformer-remark",
        options: {
          plugins: [
            `gatsby-remark-reading-time`,
            "@weknow/gatsby-remark-twitter",
            {
              resolve: `gatsby-remark-prismjs`,
              options: {
                // Class prefix for <pre> tags containing syntax highlighting;
                // defaults to 'language-' (eg <pre class="language-js">).
                // If your site loads Prism into the browser at runtime,
                // (eg for use with libraries like react-live),
                // you may use this to prevent Prism from re-processing syntax.
                // This is an uncommon use-case though;
                // If you're unsure, it's best to use the default value.
                classPrefix: "language-",
                // This is used to allow setting a language for inline code
                // (i.e. single backticks) by creating a separator.
                // This separator is a string and will do no white-space
                // stripping.
                // A suggested value for English speakers is the non-ascii
                // character '›'.
                inlineCodeMarker: null,
                // This lets you set up language aliases.  For example,
                // setting this to '{ sh: "bash" }' will let you use
                // the language "sh" which will highlight using the
                // bash highlighter.
                aliases: {}
              }
            }
          ]
        }
      },
      {
        resolve: `gatsby-plugin-facebook-pixel`,
        options: {
          pixelId: '2699911376686697',
        },
      },
      {
        resolve: `gatsby-plugin-amplitude-analytics`,
        options: {
          // Specify the API key for your Amplitude Project (required)
          apiKey: "c2f3c018a9bd18aa89c239c30a86a418",
          // Puts tracking script in the head instead of the body (optional)
          head: false,
          // Prevents loading Amplitude and logging events if visitors have "Do Not Track" enabled (optional)
          respectDNT: true,
          // Avoids sending pageview hits from custom paths (optional)
          exclude: ["/preview/**", "/do-not-track/me/too/"],
          // Override the default event types (optional)
          eventTypes: {
            outboundLinkClick: 'OUTBOUND_LINK_CLICK',
            pageView: 'PAGE_VIEW',
          },
          // Amplitude JS SDK configuration options (optional)
          amplitudeConfig: {
            saveEvents: true,
            includeUtm: true,
            includeReferrer: true
          }
        },
      },
      `gatsby-transformer-json`,
      "gatsby-remark-embed-youtube",
      "gatsby-remark-responsive-iframe",
      {
        resolve: `gatsby-source-filesystem`,
        options: {
          path: `./src/data/`,
        },
      },
      {
        resolve: "stemmlerjs-gatsby-plugin-mailchimp",
        options: {
          endpoint:
            "https://khalilstemmler.us17.list-manage.com/subscribe/post?u=6816d2889bed041b6e83840af&amp;id=44ae72b287"
        }
      },
      {
        resolve: `gatsby-self-hosted-comments`,
        options: {
          url: 'https://khalil-stemmler-backend.herokuapp.com/comments/all/'
        }
      },
      // this (optional) plugin enables Progressive Web App + Offline functionality
      // To learn more, visit: https://gatsby.app/offline
      // 'gatsby-plugin-offline',
    ],
  }
  