-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgatsby-config.js
160 lines (138 loc) · 3.85 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
const dotenv = require("dotenv");
dotenv.config({ path: "./.env.development.local" });
dotenv.config({ path: "./.env.local" });
const siteMetadata = {
title: `XIX. Simonyi Konferencia`,
description: `Magyarország legnagyobb egyetemi hallgatók által szervezett éves technológiai konferenciája.`,
author: `@simonyikonf`,
siteUrl: `https://konferencia.simonyi.bme.hu`,
image: `/preview.png`,
favicon: `/favicon.png`,
};
module.exports = {
siteMetadata,
plugins: [
`gatsby-plugin-tsconfig-paths`,
/** Contentful types */
{
resolve: `gatsby-plugin-typegen`,
options: {
emitSchema: {
"src/@types/__generated__/gatsby-schema.graphql": true,
},
emitPluginDocuments: {
"src/@types/__generated__/gatsby-plugin-documents.graphql": true,
},
outputPath: `src/@types/__generated__/gatsby-types.d.ts`,
},
},
/** Contentful integration */
{
resolve: `gatsby-source-contentful`,
options: {
spaceId: process.env.CONTENTFUL_SPACE_ID,
accessToken: process.env.CONTENTFUL_ACCESS_TOKEN,
host: process.env.CONTENTFUL_HOST,
},
},
/** Markdown */
{
resolve: `gatsby-transformer-remark`,
options: {
// Footnotes mode (default: true)
footnotes: true,
// GitHub Flavored Markdown mode (default: true)
gfm: true,
// Plugins configs
plugins: [],
},
},
/** React Helmet */
`gatsby-plugin-react-helmet`,
/** Preload images */
`gatsby-plugin-image`,
{
resolve: `gatsby-source-filesystem`,
options: {
name: `images`,
path: `${__dirname}/src/assets/images`,
},
},
/** Optimize images */
`gatsby-transformer-sharp`,
{
resolve: `gatsby-plugin-sharp`,
options: {
defaults: {
formats: [`auto`, `webp`],
placeholder: `blurred`,
},
},
},
/** Inline Contentful svgs */
`gatsby-transformer-inline-svg`,
/** Build site manifest */
{
resolve: `gatsby-plugin-manifest`,
options: {
name: siteMetadata.title,
short_name: siteMetadata.title,
start_url: `/`,
background_color: `#111827`,
theme_color: `#d1eaeb`,
display: `minimal-ui`,
icon: `src/assets/images/favicon.png`, // This path is relative to the root of the site.
},
},
/** PWA */
`gatsby-plugin-offline`,
/** MDX support */
`gatsby-plugin-mdx`,
`gatsby-plugin-sass`,
`gatsby-plugin-postcss`,
{
resolve: "gatsby-plugin-react-svg",
options: {
rule: {
include: /\.inline\.svg$/,
},
},
},
{
resolve: `gatsby-plugin-build-date`,
options: {
formatAsDateString: false, // boolean, defaults to true - if false API will return unformatted string from new Date()
// locale: 'hu', // string, defaults to null, which date-and-time defaults as "en" - whether to localize the date or not, can use any available date-and-time localization
},
},
/** Google tag manager */
{
resolve: "gatsby-plugin-google-tagmanager",
options: {
id: "GTM-MDDNSN6",
/// 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" },
/// Specify optional GTM environment details.
// gtmAuth: "YOUR_GOOGLE_TAGMANAGER_ENVIRONMENT_AUTH_STRING",
// gtmPreview: "YOUR_GOOGLE_TAGMANAGER_ENVIRONMENT_PREVIEW_NAME",
// dataLayerName: "YOUR_DATA_LAYER_NAME",
/// Name of the event that is triggered
/// on every Gatsby route change.
///
/// Defaults to gatsby-route-change
// routeChangeEventName: "YOUR_ROUTE_CHANGE_EVENT_NAME",
/// Defaults to false
enableWebVitalsTracking: true,
},
},
/** Redirects in gatsby-node.js */
`gatsby-plugin-meta-redirect`, // make sure to put last in the array
],
};