text: const ignoredFiles = []
  if (process.env.NODE_ENV === `production`) {
    ignoredFiles.push(`${__dirname}/content/posts/drafts/*`)
  }
  
  module.exports = {
    siteMetadata: {
      title: `Roy Portas`,
      description: `Blog of Roy Portas, Senior Frontend Developer`,
      author: `Roy Portas`,
      authorTwitter: `RoyPortas`,
      siteUrl: "https://beta.royportas.com",
    },
    plugins: [
      `gatsby-plugin-pnpm`,
      `gatsby-plugin-image`,
      `gatsby-transformer-sharp`,
      `gatsby-plugin-sharp`,
      `gatsby-plugin-react-helmet`,
      {
        resolve: `gatsby-source-filesystem`,
        options: {
          name: `images`,
          path: `${__dirname}/src/images`,
        },
      },
      {
        resolve: `gatsby-source-filesystem`,
        options: {
          name: `posts`,
          path: `${__dirname}/content/`,
          ignore: ignoredFiles,
        },
      },
      `gatsby-remark-images`,
      {
        resolve: `gatsby-plugin-manifest`,
        options: {
          name: `Roy Portas`,
          short_name: `Roy Portas`,
          start_url: `/`,
          background_color: `#663399`,
          theme_color: `#663399`,
          display: `minimal-ui`,
          icon: `src/images/roy-portas-icon.png`, // This path is relative to the root of the site.
        },
      },
      {
        resolve: `gatsby-plugin-mdx`,
        options: {
          gatsbyRemarkPlugins: [
            {
              resolve: `gatsby-remark-images`,
              options: {
                maxWidth: 1035,
              },
            },
            {
              resolve: `gatsby-remark-prismjs`,
              options: {},
            },
          ],
        },
      },
      {
        resolve: `gatsby-plugin-feed`,
        options: {
          query: `
            {
              site {
                siteMetadata {
                  title
                  description
                  siteUrl
                  site_url: siteUrl
                }
              }
            }
          `,
          feeds: [
            {
              serialize: ({ query: { site, allMdx } }) => {
                return allMdx.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,
                  })
                })
              },
              query: `
                {
                  allMdx(
                    sort: { order: DESC, fields: [frontmatter___date] },
                  ) {
                    edges {
                      node {
                        excerpt
                        fields { slug }
                        frontmatter {
                          title
                          date
                        }
                      }
                    }
                  }
                }
              `,
              output: "/rss.xml",
              title: "Roy Portas' Blog",
            },
          ],
        },
      },
      {
        resolve: "gatsby-plugin-sass",
        options: {
          implementation: require("sass"),
        },
      },
      {
        resolve: "@sentry/gatsby",
        options: {
          dsn:
            "https://c66c69989abe44839da4aca3a650f11c@o460665.ingest.sentry.io/5722458",
          sampleRate: 0.7,
        },
      },
      `gatsby-plugin-sitemap`,
      // this (optional) plugin enables Progressive Web App + Offline functionality
      // To learn more, visit: https://gatsby.dev/offline
      // `gatsby-plugin-offline`,
    ],
  }
  