This repository has been archived by the owner on Feb 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 132
/
gatsby-config.js
114 lines (112 loc) · 2.94 KB
/
gatsby-config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
require("dotenv").config();
const {
serializeLocale,
query: sitemapQuery,
} = require("./buildHelpers/serializeSitemap");
// Determine what environment we're running in and what the URL is.
const IS_BUILD = process.env.npm_lifecycle_event === "build";
const IS_LOCAL = process.env.PWD !== "/app/src";
const SITE_URL = IS_LOCAL
? "http://localhost:8000"
: process.env.URL || "https://developers.stellar.org";
// Gatsby config
module.exports = {
siteMetadata: {
title: "Stellar - Develop the world's new financial system",
description:
"Stellar is an open platform for building financial products that connect people everywhere.",
siteUrl: SITE_URL,
},
pathPrefix: "/",
plugins: [
"gatsby-transformer-sharp",
"gatsby-plugin-react-helmet",
"gatsby-plugin-sharp",
"gatsby-plugin-styled-components",
"gatsby-remark-images",
{
resolve: "gatsby-plugin-mdx",
options: {
gatsbyRemarkPlugins: [
"gatsby-remark-smartypants",
{
resolve: "gatsby-remark-mermaid",
options: {
theme: "neutral",
fontFamily: '"IBM Plex Sans", Arial, sans-serif',
},
},
{
resolve: `gatsby-remark-images`,
options: {
maxWidth: 800,
},
},
],
},
},
{
resolve: "gatsby-source-filesystem",
options: {
name: "images",
path: `${__dirname}/src/assets/images/`,
},
},
{
resolve: "gatsby-source-filesystem",
options: {
name: "docs-images",
path: `${__dirname}/content/docs/web-assets/`,
},
},
{
resolve: "gatsby-source-filesystem",
options: {
name: "docs",
path: `${__dirname}/content/`,
},
},
{
resolve: "gatsby-plugin-eslint",
options: {
stages: ["build-javascript", "develop"],
options: {
failOnError: IS_BUILD,
failOnWarning: IS_BUILD,
},
},
},
{
resolve: "gatsby-plugin-sitemap",
options: {
output: "/sitemap.xml",
query: sitemapQuery,
serialize: serializeLocale("en"),
},
},
{
resolve: "gatsby-plugin-react-svg",
options: {
path: `${__dirname}/src/assets/`,
rule: {
include: [/icons/, /svg\//],
},
},
},
"gatsby-plugin-folder-metadata",
// TODO: Keep an eye on Gatsby's CSP support and remove `unsafe-inline`
// https://github.com/bejamas/gatsby-plugin-csp/issues/11
// https://github.com/gatsbyjs/gatsby/issues/10890
// This plugin isn't working for gatsby scripts, and MDX necessitates
// 'unsafe-inline' at the moment.
// {
// resolve: "gatsby-plugin-csp",
// options: {
// mergeDefaultDirectives: false,
// mergeStyleHashes: false,
// directives: {
// },
// },
// },
].filter(Boolean),
};