-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgatsby-config.js
executable file
·109 lines (96 loc) · 3.38 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
// ---------------------------------------- //
// ---------------------------------------- //
// Error: ENOENT: no such file or directory
// To delete your .cache folder just, cd into your project folder and run this in shell:
// rm -r ./.cache/*
// To rebuild cache just run
// gatsby develop or gatsby build
// ---------------------------------------- //
// ---------------------------------------- //
module.exports = {
siteMetadata: {
title: 'SourceView Reader',
},
pathPrefix: `/WEB`,
plugins: [
{
resolve: `gatsby-plugin-manifest`,
options: {
name: "GatsbyJS",
short_name: "GatsbyJS",
start_url: "/",
background_color: "#f1f1f1",
theme_color: "#a2466c",
display: "minimal-ui",
icon: "src/images/SVReader.png", // This path is relative to the root of the site.
}
},
'gatsby-plugin-react-helmet',
// `gatsby-transformer-json`,
// {
// resolve: `gatsby-source-filesystem`,
// options: {
// name: `data`,
// path: `${__dirname}/src/data/`,
// },
// },
{
resolve: `gatsby-source-firebase`,
options: {
// point to the firebase private key downloaded
credential: require("./firebase-key.json"),
// your firebase database root url
databaseURL: "https://sourceview-reader.firebaseio.com",
// you can have multiple "types" that point to different paths
types: [
// {
// // this type will become `allEnglish` in graphql
// type: "English",
// // the path to get the records from
// path: "English",
// // probably don't want your entire database, use the query option
// // to limit however you'd like
// // query: ref => ref.limitToLast(10)
// // This allows you to map your data to data that GraphQL likes:
// // 1. Turn your lists into actual arrays
// // 2. Fix keys that GraphQL hates. It doesn't allow number keys
// // like "0", you'll get this error pretty often:
// // Error: Names must match /^[_a-zA-Z][_a-zA-Z0-9]*$/ but "0" does not
// // 3. Remove stuff you don't need.
// //
// // Feel free to mutate, we sent you a copy anyway.
// map: node => {
// // fix keys graphql hates
// // node.threehundred = node['300']
// // delete node['300']
// // convert a child list to an array:
// return node.sessions = Object.keys(node.sessions).map(key => {
// return { _key: key, session: node.sessions[key] }
// })
// // finally, return the node
// return node
// },
// },
// if you're data is really simple, this should be fine too
{
type: "English",
path: "English/Segments",
}
]
}
},
{
resolve: `gatsby-plugin-google-analytics`,
options: {
// trackingId: "UA-122318872-1", --sourceviewthai.com
trackingId: "UA-122992566-1",
// 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
},
}
],
}