-
Notifications
You must be signed in to change notification settings - Fork 0
/
gatsby-config.js
139 lines (135 loc) · 4.07 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
module.exports = {
siteMetadata: {
siteName: 'Siner\'s Blog',
githubUrl: 'https://github.com/siner308/blog',
image: 'https://avatars.githubusercontent.com/u/34048253?v=4'
},
plugins: [
// `gatsby-plugin-typescript` is automatically included in gatsby
// You only need to explicitly define it here if you need to configure
// specific options in it
{
resolve: 'gatsby-plugin-typography',
options: {
pathToConfigModule: 'src/utils/typography',
},
},
{
resolve: 'gatsby-source-filesystem',
options: {
name: 'sample',
path: `${__dirname}/sample-posts`,
},
},
{
resolve: 'gatsby-source-filesystem',
options: {
name: 'posts',
path: `${__dirname}/blog-posts/posts`,
},
},
{
resolve: 'gatsby-source-filesystem',
options: {
name: 'aboutme',
path: `${__dirname}/aboutme`,
},
},
{
resolve: 'gatsby-transformer-remark',
options: {
plugins: [
{
resolve: 'gatsby-remark-highlight-code',
options: {
terminal: 'carbon',
theme: 'material',
}
},
{
resolve: 'gatsby-remark-reading-time',
}
],
},
},
{
resolve: 'gatsby-plugin-google-analytics',
options: {
trackingId: 'UA-132357522-1',
head: true,
},
},
{
resolve: 'gatsby-plugin-google-tagmanager',
options: {
id: 'GTM-MWX84JT',
// 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,
// Defaults to https://www.googletagmanager.com
// selfHostedOrigin: "YOUR_SELF_HOSTED_ORIGIN",
}
},
{
resolve: 'gatsby-plugin-react-helmet',
},
{
resolve: 'gatsby-plugin-anchor-links',
},
{
resolve: 'gatsby-plugin-google-adsense',
options: {
publisherId: `ca-pub-8228498239398986`,
}
},
{
resolve: `gatsby-plugin-google-gtag`,
options: {
// You can add multiple tracking ids and a pageview event will be fired for all of them.
trackingIds: [
'G-D7YW17ZKDZ', // Google Analytics / GA
// "AW-CONVERSION_ID", // Google Ads / Adwords / AW
// "DC-FLOODIGHT_ID", // Marketing Platform advertising products (Display & Video 360, Search Ads 360, and Campaign Manager)
],
// This object gets passed directly to the gtag config command
// This config will be shared across all trackingIds
// gtagConfig: {
// optimize_id: "OPT_CONTAINER_ID",
// anonymize_ip: true,
// cookie_expires: 0,
// },
// This object is used for configuration specific to this plugin
pluginConfig: {
// Puts tracking script in the head instead of the body
head: true,
// Setting this parameter is also optional
// respectDNT: true,
// Avoids sending pageview hits from custom paths
// exclude: ["/preview/**", "/do-not-track/me/too/"],
// Defaults to https://www.googletagmanager.com
// origin: "YOUR_SELF_HOSTED_ORIGIN",
},
},
},
{
resolve: 'gatsby-plugin-postcss',
}
],
};