forked from anuraghazra/anuraghazra.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgatsby-config.js
187 lines (180 loc) · 5.1 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
const path = require('path');
const config = require('./config/website');
module.exports = {
siteMetadata: {
title: config.siteTitle,
description: config.siteDescription,
twitter: config.twitter,
siteUrl: config.siteUrl,
siteLogo: config.siteLogo,
siteBanner: config.siteBanner,
},
plugins: [
// DSGVO
{
resolve: `gatsby-plugin-gdpr-cookies`,
options: {
googleAnalytics: {
trackingId: 'dummy_id', // leave empty if you want to disable the tracker
cookieName: 'gatsby-gdpr-google-analytics', // default
anonymize: true, // default
allowAdFeatures: false // default
},
googleTagManager: {
trackingId: 'dummy_thing', // leave empty if you want to disable the tracker
cookieName: 'gatsby-gdpr-google-tagmanager', // default
dataLayerName: 'dataLayer', // default
},
facebookPixel: {
pixelId: 'no_id', // leave empty if you want to disable the tracker
cookieName: 'gatsby-gdpr-facebook-pixel', // default
},
tikTokPixel: {
pixelId: 'nothing', // leave empty if you want to disable the tracker
cookieName: 'gatsby-gdpr-tiktok-pixel', // default
},
linkedin: {
trackingId: 'no_linkedin', // leave empty if you want to disable the tracker
cookieName: 'gatsby-gdpr-linked-in', // default
},
// defines the environments where the tracking should be available - default is ["production"]
environments: ['production', 'development']
},
},
// MARKDOWN
{
resolve: `gatsby-transformer-remark`,
options: {
plugins: [
`gatsby-remark-embedder`,
{
resolve: `gatsby-remark-autolink-headers`,
options: {
className: `gatsby-remark-autolink`,
maintainCase: true,
removeAccents: true,
},
},
{
resolve: `gatsby-remark-prismjs`,
options: {
classPrefix: 'language-',
inlineCodeMarker: null,
aliases: {},
showLineNumbers: true,
noInlineHighlight: false,
},
},
{
resolve: `gatsby-remark-images`,
options: {
maxWidth: 590,
showCaptions: true,
},
},
`gatsby-plugin-social-banners`,
],
},
},
// SOURCE FILE SYSTEM -
// SOURCE JSON
`gatsby-transformer-json`,
{
resolve: `gatsby-source-filesystem`,
options: {
path: `${__dirname}/content/json`,
},
},
// SOURCE MARKDOWN
{
resolve: `gatsby-source-filesystem`,
options: {
name: 'case-studies',
path: `${__dirname}/content/case-studies`,
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: 'blog',
path: `${__dirname}/content/blog/`,
},
},
// IMAGE TRANSFORMER
`gatsby-transformer-sharp`,
`gatsby-plugin-sharp`,
{
resolve: `gatsby-source-filesystem`,
options: {
name: `images`,
path: `src/static/images`,
},
},
// manifest & helmet
`gatsby-plugin-react-helmet`,
{
resolve: `gatsby-plugin-manifest`,
options: {
name: config.siteTitleAlt,
short_name: config.siteShortName,
start_url: `/`,
background_color: config.backgroundColor,
theme_color: config.themeColor,
display: `standalone`,
icon: config.siteLogo,
},
},
// this (optional) plugin enables Progressive Web App + Offline functionality
// To learn more, visit: https://gatsby.dev/offline
// `gatsby-plugin-offline`,
// fonts
// https://fonts.googleapis.com/css?family=Karla:400,700|Montserrat:400,600,700,900&display=swap
// families: ['Karla&display=swap', 'Montserrat:400,700,900&display=swap']
// {
// resolve: 'gatsby-plugin-web-font-loader',
// options: {
// custom: {
// families: [
// 'Karla',
// 'Montserrat:n4,n7,n9'
// ],
// urls: [
// 'https://fonts.googleapis.com/css?family=Karla&display=swap',
// 'https://fonts.googleapis.com/css?family=Montserrat:400,700,900&display=swap'
// ]
// }
// }
// },
// NProgress
{
resolve: `gatsby-plugin-nprogress`,
options: {
color: `#6D83F2`,
showSpinner: false,
},
},
// others
{
resolve: 'gatsby-plugin-robots-txt',
options: {
host: config.siteUrl,
sitemap: `${config.siteUrl}/sitemap.xml`,
env: {
development: {
policy: [{ userAgent: '*', disallow: ['/'] }],
},
production: {
policy: [{ userAgent: '*', allow: '/', disallow: '/goodies' }],
},
},
},
},
{
resolve: `gatsby-plugin-sitemap`,
options: {
exclude: [`/blog/tags/*`, `/goodies`],
},
},
`gatsby-plugin-styled-components`,
],
};