text: const metadata = require("./metadata");
  
  module.exports = {
    siteMetadata: {
      ...metadata,
    },
    plugins: [
      {
        resolve: `gatsby-plugin-typescript`,
        options: {
          isTSX: true,
          allExtensions: true,
        },
      },
      `gatsby-plugin-styled-components`,
      {
        resolve: `gatsby-source-filesystem`,
        options: {
          path: `${__dirname}/assets`,
          name: `assets`,
        },
      },
      {
        resolve: `gatsby-source-filesystem`,
        options: {
          path: `${__dirname}/content`,
          name: `docs`,
        },
      },
      {
        resolve: `gatsby-plugin-mdx`,
        options: {
          extensions: [".mdx", ".md"],
          plugins: ["gatsby-remark-images"],
          gatsbyRemarkPlugins: [
            {
              resolve: `gatsby-remark-images`,
              options: {
                maxWidth: 800,
                quality: 100,
              },
            },
            {
              resolve: `gatsby-remark-responsive-iframe`,
              options: {
                wrapperStyle: `margin-bottom: 1.0725rem`,
              },
            },
            {
              resolve: `gatsby-remark-copy-linked-files`,
            },
  
            {
              resolve: `gatsby-remark-smartypants`,
            },
          ],
        },
      },
      `gatsby-transformer-sharp`,
      `gatsby-plugin-sharp`,
      {
        resolve: `gatsby-plugin-manifest`,
        options: {
          name: metadata.siteTitle,
          short_name: metadata.siteShortTitle,
          start_url: `/`,
          display: `minimal-ui`,
          icon: `assets/logo.svg`,
        },
      },
      `gatsby-plugin-remove-serviceworker`,
      `gatsby-plugin-react-helmet`,
      {
        resolve: `gatsby-plugin-typography`,
        options: {
          pathToConfigModule: `src/styles/typography`,
        },
      },
      {
        resolve: `gatsby-plugin-google-analytics`,
        options: {
          trackingId: "UA-84098400-12",
          // Defines where to place the tracking script - `true` in the head and `false` in the body
          head: false,
          anonymize: true,
          respectDNT: true,
          // Delays sending pageview hits on route update (in milliseconds)
          pageTransitionDelay: 0,
        },
      },
      {
        resolve: "gatsby-plugin-local-search",
        options: {
          name: "pages",
          engine: "flexsearch",
  
          // GraphQL query used to fetch all data for the search index.
          query: `
            {
              allMdx {
                edges {
                  node {
                    id
                    fields {
                      slug
                    }
                    frontmatter {
                      title
                    }
                    headings {
                      value
                    }
                  }
                }
              }
            }
          `,
  
          // List of keys to store and make available in your UI. The values of
          // the keys are taken from the normalizer function below.
          store: ["id", "title", "slug"],
  
          // Function used to map the result from the GraphQL query. This should
          // return an array of items to index in the form of flat objects
          // containing properties to index.
          normalizer: ({ data }) =>
            data.allMdx.edges.map(({ node }) => ({
              id: node.id,
              slug: node.fields.slug,
              title: node.frontmatter.title,
              headings: node.headings.map(h => h.value).join(" "),
            })),
        },
      },
    ],
  };
  