-
Notifications
You must be signed in to change notification settings - Fork 0
/
gatsby-config.js
87 lines (83 loc) · 2.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
const config = require('./meta/config')
require('dotenv').config()
const query = `{
allStrapiEvent {
edges {
node {
objectID: id
Title
Time
Day(formatString: "dddd DD", locale: "ca")
Info
}
}
}
}`
const queries = [
{
query,
transformer: ({ data }) =>
data.allStrapiEvent.edges.map(({ node }) => node), // optional
},
]
module.exports = {
siteMetadata: {
title: config.siteTitle,
siteUrl: config.siteUrl,
algolia: {
appId: process.env.MY_ALGOLIA_APP_ID || '',
searchOnlyApiKey: process.env.MY_ALGOLIA_SEARCHONLY_API_KEY || '',
indexName: 'events',
},
},
plugins: [
'gatsby-plugin-react-helmet',
'gatsby-plugin-sass',
{
resolve: `gatsby-source-strapi`,
options: {
apiURL: 'https://okstudio-fmvng18-backend.herokuapp.com',
contentTypes: [`event`, `eventlist`],
loginData: {
identifier: process.env.STRAPI_USER || '',
password: process.env.STRAPI_PASSWORD || '',
},
},
},
{
resolve: `gatsby-plugin-algolia`,
options: {
appId: process.env.MY_ALGOLIA_APP_ID || '',
apiKey: process.env.MY_ALGOLIA_ADMIN_API_KEY || '',
indexName: 'events', // for all queries
queries,
chunkSize: 10000, // default: 1000
},
},
{
resolve: `gatsby-plugin-manifest`,
options: {
name: 'Programa FMVng',
short_name: 'FMVNG18',
start_url: '/',
background_color: '#fff',
theme_color: '#FFC107',
display: 'standalone',
icon: 'src/img/icon-512x512.png',
},
},
'gatsby-plugin-offline',
{
resolve: `gatsby-plugin-google-analytics`,
options: {
trackingId: process.env.MY_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,
},
},
],
}