-
Notifications
You must be signed in to change notification settings - Fork 23
/
gatsby-config.js
271 lines (269 loc) · 8.65 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
require("dotenv").config({
path: `.env.${process.env.NODE_ENV}`,
});
const robots = process.env.GATSBY_ROBOTS || "show";
module.exports = {
siteMetadata: {
defaultTitle:
"4Geeks Academy - Miami Coding Bootcamp, Madrid España, Santiago de Chile and Caracas",
titleTemplate: "%s · 4Geeks Academy",
siteUrl: `https://4geeksacademy.com`,
defaultDescription: {
us: "4Geeks Academy is a world-wide leading coding school focused specially in part-time studies, you don't have to quite your job to become a web developer. Career support for life, coding mentoring for life. We have Miami Coding bootcamps; in Madrid, Spain; Santiago de Chile and Caracas, Venezuela. ",
es: "4Geeks Academy es un coding bootcamp a nivel mundial que se especializa en la programación e informatica, en estudios principalmente part-time donde no tienes que dejar tu trabajo para aprender a programar.",
},
defaultImage: "/images/4geeks-main.jpg",
social: {
defaultTwitterUsername: "@4geeksacademy",
defaultFacebookUsername: "/4geeksacademy",
defaultInstagramUsername: "@4geeksacademy",
youtube: "https://www.youtube.com/channel/UC1ZyAx5eyV9gTFWpHPs9-GA",
github: "https://github.com/4geeksacademy",
},
org: {
name: "4Geeks Academy",
logo: "/images/4geeksacademy-logo.png",
},
siteVerification: {
google: "",
bing: "",
},
},
trailingSlash: "never",
plugins: [
{
resolve: "gatsby-plugin-cookiebot",
options: {
cookiebotId: "0dd80df5-30f5-4a4e-9410-55e586915d04", // Required. Site's Cookiebot ID.
manualMode: false, // Optional. Turns on Cookiebot's manual mode. Defaults to false.
blockGtm: true, // Optional. Skip blocking of GTM. Defaults to true if manualMode is set to true.
includeInDevelopment: true, // Optional. Enables plugin in development. Will cause gatsby-plugin-google-tagmanager to thrown an error when pushing to dataLayer. Defaults to false.
},
},
"gatsby-transformer-yaml",
`gatsby-plugin-image`,
"gatsby-plugin-sharp",
"gatsby-transformer-sharp",
{
resolve: "gatsby-plugin-remove-console",
options: {
exclude: ["error", "warn"], // <- will be removed all console calls except these
},
},
// {
// resolve: "gatsby-plugin-load-script",
// options: {
// src: `https://www.google.com/recaptcha/api.js?render=${process.env.GATSBY_CAPTCHA_KEY}`,
// // src: `https://www.google.com/recaptcha/enterprise.js?render=${process.env.GATSBY_CAPTCHA_KEY}`,
// },
// },
{
resolve: `gatsby-transformer-remark`,
options: {
plugins: [
{
resolve: `gatsby-remark-prismjs`,
options: {},
},
{
resolve: "gatsby-remark-component",
options: { components: ["button", "call-to-action"] },
},
{
resolve: `gatsby-remark-autolink-headers`,
options: {
offsetY: `0`,
icon: `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M22.548 9l.452-2h-5.364l1.364-6h-2l-1.364 6h-5l1.364-6h-2l-1.364 6h-6.184l-.452 2h6.182l-1.364 6h-5.36l-.458 2h5.364l-1.364 6h2l1.364-6h5l-1.364 6h2l1.364-6h6.185l.451-2h-6.182l1.364-6h5.366zm-8.73 6h-5l1.364-6h5l-1.364 6z"/></svg>`,
className: `heading-link`,
maintainCase: false,
removeAccents: true,
isIconAfterHeader: false,
elements: [`h2`],
},
},
],
},
},
"gatsby-plugin-loadable-components-ssr",
{
resolve: "gatsby-plugin-rollbar",
options: {
accessToken: process.env.ROLLBAR_ACCESS_TOKEN,
// For all configuration options, see https://docs.rollbar.com/docs/rollbarjs-configuration-reference
captureUncaught: true,
captureUnhandledRejections: true,
payload: {
environment: process.env.NODE_ENV,
server: {
branch: process.env.VERCEL_GITHUB_COMMIT_REF,
host: process.env.VERCEL_URL,
},
},
},
},
{
resolve: "gatsby-plugin-react-svg",
options: {
rule: {
include: /\.inline\.svg/, // See below to configure properly
},
},
},
{
resolve: "gatsby-plugin-web-font-loader",
options: {
custom: {
families: ["Lato", "Inter", "Archivo"],
urls: ["/fonts/fonts.css"],
},
},
},
{
resolve: "gatsby-plugin-manifest",
options: {
name: "4Geeks Academy - Miami Coding Bootcamp, Madrid España, Santiago de Chile and Caracas",
short_name: "4Geeks Academy - Miami Coding Bootcamp and worldwide",
start_url: "/",
background_color: "#ffffff",
theme_color: "#744C9E",
display: "standalone",
icon: "src/assets/logos/favicon.png",
},
},
{
resolve: "gatsby-source-filesystem",
options: {
path: `${__dirname}/src`,
name: "src",
},
},
{
resolve: "gatsby-source-filesystem",
options: {
path: `${__dirname}/static/`,
name: "static",
},
},
"gatsby-plugin-root-import",
"gatsby-plugin-react-helmet",
"gatsby-plugin-offline",
"gatsby-plugin-styled-components",
"gatsby-plugin-zeit-now",
"gatsby-remark-reading-time",
// 'gatsby-plugin-meta-redirect',
{
resolve: `gatsby-plugin-advanced-sitemap`,
options: {
exclude: [
`/admin`,
`/tags`,
`/edit`,
`/landings`,
`/offline-plugin-app-shell-fallback`,
],
// output: "/custom-sitemap.xml",
// 1 query for each data type
query: `
{
allSitePage(
filter: {
path: { regex: "/^((?!\/blog).)*$/" }
}
) {
edges{
node {
id
pageContext
slug: path
}
}
}
allClusterPage: allSitePage(
filter: {
path: { regex: "/.*(\/blog).*/" }
}
) {
edges{
node {
id
pageContext
slug: path
}
}
}
allBlogsPage: allSitePage{
edges{
node {
id
pageContext
slug: path
}
}
}
}`,
// The filepath and name to Index Sitemap. Defaults to '/sitemap.xml'.
mapping: {
// Each data type can be mapped to a predefined sitemap
// Routes can be grouped in one of: posts, tags, authors, pages, or a custom name
// The default sitemap - if none is passed - will be pages
allSitePage: {
sitemap: `page-sitemap`,
serializer: (edges) => {
return edges.filter(({ node }) => {
if (node.pageContext.filePath?.includes("/data/blog/"))
return false;
return node.pageContext?.visibility
? !["unlisted", "hidden"].includes(
node.pageContext.visibility
)
: true;
});
},
},
allClusterPage: {
sitemap: `category-sitemap`,
},
allBlogsPage: {
sitemap: `post-sitemap`,
serializer: (edges) => {
return edges.filter(({ node }) =>
node.pageContext?.filePath?.includes("/data/blog/")
);
},
},
},
},
},
{
resolve: "gatsby-plugin-robots-txt",
options: {
env: {
production: {
sitemap: `https://4geeksacademy.com/sitemap.xml`,
policy:
robots !== "hidden"
? [{ userAgent: "*" }]
: [{ userAgent: "*", disallow: ["/"] }],
},
development: {
policy: [{ userAgent: "*", disallow: ["/"] }],
},
},
},
},
{
resolve: "gatsby-plugin-google-tagmanager",
options: {
id: "GTM-PGGRR6",
// Include GTM in development.
// Defaults to false meaning GTM will only be loaded in production.
includeInDevelopment: false,
// datalayer to be set before GTM is loaded
// should be an object or a function that is executed in the browser
// Defaults to null
defaultDataLayer: { platform: "gatsby" },
routeChangeEventName: "website-route-change",
},
},
],
};