-
Notifications
You must be signed in to change notification settings - Fork 4
/
gatsby-config.js
106 lines (104 loc) · 3.02 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
require('@babel/polyfill');
require("dotenv").config({
KONTENT_PREVIEW_API_KEY: `.env.${process.env.KONTENT_PREVIEW_API_KEY}`,
})
module.exports = {
siteMetadata: {
title: 'Kentico GitHub Community',
description: 'A gateway to the world of open-source at Kentico.',
ogtitle: 'Kentico GitHub Community Home',
siteurl: 'https://kentico.github.io'
},
plugins: [
'gatsby-plugin-react-helmet',
`gatsby-plugin-sass`,
{
resolve: `gatsby-plugin-manifest`,
options: {
name: 'GitHub Community',
short_name: 'GitHub Community',
start_url: '/',
background_color: '#1C263F',
theme_color: '#1C263F',
display: 'minimal-ui',
icon: 'src/images/favicon.png', // This path is relative to the root of the site.
},
},
{
resolve: 'gatsby-plugin-offline',
options: {
runtimeCaching: [
{
urlPattern: /^https:\/\/assets-us-01.kc-usercontent.com\//,
handler: 'staleWhileRevalidate',
options: {
cacheableResponse: {
statuses: [0, 200]
},
cacheName: 'kc-assets-data'
}
},
{
urlPattern: /^https:\/\/fonts\.googleapis\.com/,
handler: 'staleWhileRevalidate',
options: {
cacheableResponse: {
statuses: [0, 200]
},
cacheName: 'google-fonts-stylesheets'
}
},
{
urlPattern: /^https:\/\/fonts\.gstatic\.com/,
handler: 'cacheFirst',
options: {
cacheableResponse: {
statuses: [0, 200]
},
cacheName: 'google-fonts-webfonts',
expiration: {
maxAgeSeconds: 60 * 60,
maxEntries: 30
}
}
},
{
urlPattern: /^https:\/\/avatars[0-9]+.githubusercontent.com\//,
handler: 'staleWhileRevalidate',
options: {
cacheableResponse: {
statuses: [0, 200]
},
cacheName: 'github-assets-webfonts',
expiration: {
maxAgeSeconds: 60 * 60,
maxEntries: 30
}
}
}
]
}
},
'gatsby-plugin-eslint', // https://www.gatsbyjs.org/packages/gatsby-plugin-eslint/
{
resolve: '@kentico/gatsby-source-kontent',
options: {
projectId: '1bb2313f-2550-0025-06d9-f3e5065607c0', // Fill in your Project ID
// if false used authorization key for secured API
usePreviewUrl: Boolean(process.env.KONTENT_PREVIEW_API_KEY),
authorizationKey: process.env.KONTENT_PREVIEW_API_KEY
? process.env.KONTENT_PREVIEW_API_KEY
: undefined,
languageCodenames: [
'default'
],
},
},
{
resolve: 'gatsby-plugin-google-analytics',
options: {
trackingId: 'UA-69014260-7'
}
}
],
}