gatsby-config.js 958 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. require("dotenv").config({
  2. path: `.env.${process.env.NODE_ENV}`,
  3. });
  4. const siteMetadata = {
  5. siteUrl: process.env.GATSBY_SITE_URL,
  6. title: "Wormhole",
  7. };
  8. module.exports = {
  9. siteMetadata,
  10. plugins: [
  11. `gatsby-plugin-react-helmet`,
  12. `gatsby-plugin-top-layout`,
  13. `gatsby-plugin-material-ui`,
  14. {
  15. resolve: "gatsby-plugin-robots-txt",
  16. options: {
  17. host: siteMetadata.siteUrl,
  18. sitemap: `${siteMetadata.siteUrl}/sitemap/sitemap-index.xml`,
  19. env: {
  20. development: {
  21. policy: [{ userAgent: "*", disallow: ["/"] }],
  22. },
  23. production: {
  24. policy: [{ userAgent: "*", allow: "/" }],
  25. },
  26. },
  27. },
  28. },
  29. `gatsby-plugin-sitemap`,
  30. {
  31. resolve: `gatsby-plugin-google-gtag`,
  32. options: {
  33. trackingIds: [String(process.env.GATSBY_GA_TAG)],
  34. },
  35. },
  36. `gatsby-plugin-meta-redirect`, // make sure to put last in the array
  37. ],
  38. };