-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgatsby-config.js
139 lines (130 loc) · 3.92 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 = {
// Add this if you want to deploy to github pages or if you deploy to sub-route
// pathPrefix: "/reponame",
siteMetadata: {
title: `invoker-gatsby`,
description: `An opiniated starter for gatsby projects built by Meridian.id. This starter ships with the main Gatsby configuration files you might need.`,
author: `Ongki 'vasilenka' Herlambang <ongki@herlambang.id | o@meridian.id>`,
// This line needed for SITEMAP GENERATOR and ROBOT.txt
siteUrl: `https://meridian.id`,
},
plugins: [
{
resolve: `gatsby-source-filesystem`,
options: {
name: `pages`,
path: `${__dirname}/src/pages`,
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `images`,
path: `${__dirname}/src/assets/images`,
},
},
`gatsby-transformer-sharp`,
`gatsby-plugin-sharp`,
/** Gatsby MDX
* Learn more here: https://www.gatsbyjs.org/packages/gatsby-plugin-mdx/
* */
{
resolve: `gatsby-plugin-mdx`,
options: {
defaultLayouts: {
default: require.resolve("./src/layouts/Default/Default.js")
},
}
},
// Add SVG inline
{
resolve: 'gatsby-plugin-react-svg',
options: {
rule: {
include: /\.inline\.svg$/
}
}
},
`gatsby-plugin-sass`,
`gatsby-plugin-react-helmet`,
{
resolve: `gatsby-plugin-manifest`,
options: {
name: `gatsby-starter-default`,
short_name: `starter`,
start_url: `/`,
background_color: `#008380`,
theme_color: `#008380`,
display: `minimal-ui`,
icon: `src/assets/images/mid.png`, // This path is relative to the root of the site.
},
},
// Analytics using the new GTAG
{
resolve: `gatsby-plugin-gtag`,
options: {
// your google analytics tracking id
trackingId: `UA-XXXXXXXX-X`,
head: true,
anonymize: true,
},
},
// Analytics using DEPRECATED API setup
{
resolve: `gatsby-plugin-google-analytics`,
options: {
trackingId: "YOUR_GOOGLE_ANALYTICS_TRACKING_ID",
// Puts tracking script in the head instead of the body
head: false,
// Setting this parameter is optional
anonymize: true,
// Setting this parameter is also optional
respectDNT: true,
// Avoids sending pageview hits from custom paths
exclude: ["/preview/**", "/do-not-track/me/too/"],
// Enables Google Optimize using your container Id
optimizeId: "YOUR_GOOGLE_OPTIMIZE_TRACKING_ID",
// Enables Google Optimize Experiment ID
experimentId: "YOUR_GOOGLE_EXPERIMENT_ID",
// Set Variation ID. 0 for original 1,2,3....
variationId: "YOUR_GOOGLE_OPTIMIZE_VARIATION_ID",
// Any additional create only fields (optional)
sampleRate: 5,
siteSpeedSampleRate: 10,
cookieDomain: "example.com",
},
},
// Generate SITEMAP.xml
`gatsby-plugin-sitemap`,
// Generate ROBOT.txt
{
resolve: 'gatsby-plugin-robots-txt',
options: {
host: 'https://meridian.id',
sitemap: 'https://meridian.id/sitemap.xml',
policy: [{ userAgent: '*', allow: '/' }]
}
},
// Add N-PROGRESS loading bar
{
resolve: `gatsby-plugin-nprogress`,
options: {
color: `#008384`,
showSpinner: false,
},
},
// PRIMSIC GRAPHQL
{
resolve: `gatsby-source-prismic-graphql`,
options: {
repositoryName: 'mid-dummy',
omitScript: true,
previews: false,
accessToken: 'MC5YUS1aWFJFQUFOd0FjLUxq.77-9CX3vv73vv71w77-977-9Y2jvv73vv73vv71277-977-9F21477-977-9K1MwRO-_ve-_vS8S77-9KE8',
},
},
// this (optional) plugin enables Progressive Web App + Offline functionality
// To learn more, visit: https://gatsby.dev/offline
// `gatsby-plugin-offline`,
],
}