text: require("dotenv").config({
    path: `.env`,
  })
  
  module.exports = {
    siteMetadata: {
      title: `Colin Busby`,
      description: `A collection of Drupal 8 snippets and articles on topics from entity queries to templating and libraries.`,
      author: `Colin Busby`,
      siteUrl: `https://www.colinbusby.com`,
    },
    plugins: [
      `gatsby-plugin-react-helmet`,
      {
        resolve: `gatsby-source-filesystem`,
        options: {
          name: `images`,
          path: `${__dirname}/src/images`,
        },
      },
      {
        resolve: `gatsby-plugin-google-analytics`,
        options: {
          // The property ID; the tracking code won't be generated without it
          trackingId: "UA-1270516-1",
          // Defines where to place the tracking script - `true` in the head and `false` in the body
          head: false,
          // Setting this parameter is optional
          anonymize: true,
          // Setting this parameter is also optional
          respectDNT: true,
          // Avoids sending pageview hits from custom paths
          // exclude: ["/preview/**", "/do-not-track/me/too/"],
          // Delays sending pageview hits on route update (in milliseconds)
          pageTransitionDelay: 60,
          // Enables Google Optimize using your container Id
          // optimizeId: "YOUR_GOOGLE_OPTIMIZE_TRACKING_ID",
          // Enables Google Optimize Experiment ID
          // experimentId: "YOUR_GOOGLE_EXPERIMENT_ID",
          // Set Variation ID. 0 for original 1,2,3....
          // variationId: "YOUR_GOOGLE_OPTIMIZE_VARIATION_ID",
          // Any additional optional fields
          // sampleRate: 5,
          // siteSpeedSampleRate: 10,
          // cookieDomain: "example.com",
        },
      },
      {
        resolve: `gatsby-plugin-react-helmet-canonical-urls`,
        options: {
          siteUrl: `https://www.colinbusby.com`,
          noTrailingSlash: true,
        },
      },
      `gatsby-plugin-sitemap`,
      `gatsby-transformer-sharp`,
      `gatsby-plugin-sharp`,
      {
        resolve: `gatsby-plugin-manifest`,
        options: {
          name: `gatsby-starter-default`,
          short_name: `starter`,
          start_url: `/`,
          background_color: `#2c7a7b`,
          theme_color: `#2c7a7b`,
          display: `minimal-ui`,
          icon: `src/images/icon.png`, // This path is relative to the root of the site.
        },
      },
      // this (optional) plugin enables Progressive Web App + Offline functionality
      // To learn more, visit: https://gatsby.dev/offline
      `gatsby-plugin-offline`,
      {
        resolve: `gatsby-source-drupal`,
        options: {
          baseUrl: `https://drupal.colinbusby.com/`,
          apiBase: `jsonapi`, // endpoint of Drupal server
          // basicAuth: {
          //   username: process.env.BASIC_AUTH_USERNAME,
          //   password: process.env.BASIC_AUTH_PASSWORD,
          // },
        },
      },
      // Add after these plugins if used
      {
        resolve: `gatsby-plugin-purgecss`,
        options: {
          printRejected: true, // Print removed selectors and processed file names
          develop: false, // Enable while using `gatsby develop`
          tailwind: true, // Enable tailwindcss support
          whitelist: ["whitelist", "html", "body", "a"],
          whitelistPatternsChildren: [/^token/, /^pre/, /^code/],
          ignore: ["/ignored.css", "prismjs/", "docsearch.js/"], // Ignore files/folders
          // purgeOnly : ['components/', '/main.css', 'bootstrap/'], // Purge only these files/folders
        },
      },
    ],
  }
  