-
Notifications
You must be signed in to change notification settings - Fork 43
/
gatsby-config.js
101 lines (96 loc) · 2.19 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
require('dotenv').config()
let algoliaQueries = require('./src/algolia-queries')
let plugins = [
'gatsby-plugin-react-helmet',
'gatsby-plugin-sitemap',
{
resolve: `gatsby-plugin-manifest`,
options: {
name: 'WebPurple',
short_name: 'WebPurple',
start_url: '/',
background_color: '#ffffff',
theme_color: '#9012fe',
display: 'minimal-ui',
icon: 'static/android-chrome-512x512.png',
},
},
'gatsby-plugin-flow',
'gatsby-plugin-styled-components',
{
resolve: 'gatsby-source-filesystem',
options: {
path: `${__dirname}/src/pages`,
name: 'pages',
},
},
{
resolve: 'gatsby-source-filesystem',
options: {
path: `${__dirname}/static/img`,
name: 'images',
},
},
'gatsby-plugin-sharp',
'gatsby-transformer-sharp',
{
resolve: 'gatsby-transformer-remark',
options: {
plugins: ['gatsby-remark-prismjs'],
},
},
`gatsby-transformer-yaml`,
'gatsby-plugin-netlify-cms',
{
resolve: `gatsby-plugin-google-analytics`,
options: {
trackingId: 'UA-85053004-1',
head: true,
anonymize: true,
respectDNT: true,
},
},
]
if (process.env.ALGOLIA_ADMIN_KEY) {
plugins.push({
resolve: `gatsby-plugin-algolia`,
options: {
appId: '16WOJBASFD',
apiKey: process.env.ALGOLIA_ADMIN_KEY,
queries: algoliaQueries,
chunkSize: 10000,
},
})
}
plugins = [
...plugins,
'gatsby-plugin-offline',
'gatsby-plugin-webpack-size',
{
resolve: `gatsby-plugin-netlify`,
options: {
headers: {
'/*': ['X-Frame-Options: allow-from https://kitos.github.io/'],
},
mergeSecurityHeaders: false,
},
},
]
module.exports = {
siteMetadata: {
title: 'WebPurple',
siteUrl: 'https://www.webpurple.net',
},
plugins,
mapping: {
'MarkdownRemark.frontmatter.author': 'SpeakerYaml',
'EventYaml.vkAlbum': 'VkAlbum',
// TODO: remove this mapping
'EventYaml.fields.talks': 'EventTalk',
'EventYaml.talks.speaker': 'SpeakerYaml',
'EventTalk.speaker': 'SpeakerYaml',
'EventTalk.event': 'EventYaml',
'SpeakerYaml.fields.talks': 'EventTalk',
// 'EventYaml.talks.speaker': 'SpeakerYaml',
},
}