forked from lekzd/spb-frontend.ru
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgatsby-config.js
137 lines (135 loc) · 3.43 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
let keys
try {
keys = require('./keys.js')
} catch (err) {
keys = {
contentful: {
space_id: '',
token: '',
},
}
}
module.exports = {
siteMetadata: {
title: 'SPB Frontend',
description: 'Питерское сообщество фронтендеров SPB Frontend',
siteUrl: 'https://spb-frontend.ru',
link: 'http://spb-frontend.ru/podcast/',
podcast: {
title: 'SPB Frontend Drinkcast',
description: 'Подкаст питерского сообщества фронтендеров SPB Frontend',
site_url: 'http://spb-frontend.ru/podcast/',
image_url:
'http://ucarecdn.com/7045a961-d664-4a33-b67d-72d11c186b58/drinkcastcover.png',
feed_url: 'http://spb-frontend.ru/podcast.xml',
language: 'ru',
author: 'SPB Frontend',
categories: ['Technology'],
explicit: false,
copyright: 'All rights reserved',
},
},
plugins: [
// {
// resolve: 'gatsby-source-filesystem',
// options: {
// name: 'podcast',
// path: `${__dirname}/podcast`,
// },
// },
// 'gatsby-transformer-remark',
// 'gatsby-transformer-json',
{
resolve: 'gatsby-source-contentful',
options: {
spaceId: process.env.CONTENTFUL_SPACE_ID || keys.contentful.space_id,
accessToken: process.env.CONTENTFUL_TOKEN || keys.contentful.token,
},
},
{
resolve: 'plugin-feed',
options: {
query: `
{
site {
siteMetadata {
podcast {
title
description
site_url
image_url
feed_url
language
author
categories
explicit
copyright
}
}
}
}
`,
feeds: [
{
query: `
{
allContentfulDrinkcast(
limit: 1000,
sort: { order: DESC, fields: [date] },
) {
edges {
node {
notes {
notes
}
id
file
title
date
duration
explicit
length
image {
file {
url
fileName
contentType
}
}
}
}
}
}
`,
output: '/podcast.xml',
},
],
},
},
{
resolve: 'gatsby-plugin-manifest',
options: {
name: 'SPB Frontend official site',
short_name: 'Akurganow',
start_url: '/',
theme_color: '#fff',
background_color: '#fff',
display: 'minimal-ui',
icons: [
{
src: '/favicons/android-chrome-192x192.png',
sizes: '192x192',
type: 'image/png',
},
{
src: '/favicons/android-chrome-512x512.png',
sizes: '512x512',
type: 'image/png',
},
],
},
},
'gatsby-plugin-react-helmet',
'gatsby-plugin-remove-serviceworker',
],
}