-
Notifications
You must be signed in to change notification settings - Fork 6
/
z_gatsby-config.js
270 lines (264 loc) · 7.07 KB
/
z_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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
require('dotenv').config();
const TailwindExtractor = require('./utils/purgecss-tailwind-extractor');
const siteMetadata = {
title: 'Paralelná Polis Košice',
description:
'Paralelná Polis Košice je zameraná na vzdelávanie, objavovanie, tvorenie lepších systémov, experimentovanie a aplikáciu kryptomien a spojených technológií do bežného života. Je tu pre všetkých, ktorí majú záujem fungovať slobodnejšie a nezávislejšie.',
siteUrl: 'https://www.paralelnapoliskosice.sk',
image: '/ppke-temp.jpg',
email: '[email protected]',
social: {
facebook: 'https://www.facebook.com/paralelnapoliske',
github: 'https://github.com/ParalelnaPolisKE',
instagram: 'https://www.instagram.com/paralelnapoliske',
youtube: 'https://www.youtube.com/channel/UCC90ybnmSHgleXJaWPces9g',
twitter: 'https://twitter.com/parallelpoliske',
rss: '/blog/rss.xml',
},
crypto: {
BTC: '1KGB5uxAZrFYrHKsydLvfhwT4VULE1tunA',
LTC: 'Lha1KBxm5wgtTEJdk1tyBhWgAuxJ2zV9zX',
XMR:
'49XCoar5nDSiz3QfSa25jyJ5KJSc95pkpS8YXWVoB3TY8LDVjEjhUoZRRQL5sidfLB6cUWnxH2Tv5VbGKzxxieJqQPPHuea',
ETH: '0x610825C5DFcbc72E284E5a5F381f4fd728263706',
ETC: '0x1934945354BDe5b34F0c68E6AA78492050856D38',
},
nodes: {
BTC: {
mainnet: {
url: 'btc.ppke.sk',
},
},
LTC: {
mainnet: {
url: 'ltc.ppke.sk',
},
},
XMR: {
mainnet: {
url: 'xmr.ppke.sk:18081',
},
},
},
facebookAppID: '2127644397453206',
mailchimpUrl:
'https://paralelnapoliskosice.us19.list-manage.com/subscribe/post?u=8affbd08463d07e25a8bbcca4&id=b02c302d92',
joinUsFormAction:
'https://briskforms.com/go/410d7fbf05f2283f04c8a02e86b531be',
};
const plugins = [
{
resolve: 'gatsby-plugin-feed',
options: {
feeds: [
{
serialize: ({ query: { site, allMarkdownRemark } }) => {
return allMarkdownRemark.edges.map(({ node }) => {
return {
title: node.frontmatter.title,
description: node.excerpt,
url: `${site.siteMetadata.siteUrl}/blog${node.fields.slug}`,
guid: `${site.siteMetadata.siteUrl}/blog${node.fields.slug}`,
author: node.frontmatter.author.id,
custom_elements: [
{
pubDate: new Date(node.fields.date).toUTCString(),
},
],
};
});
},
setup: ({
query: {
site: { siteMetadata },
},
}) => {
return {
title: `${siteMetadata.title} - Blog`,
description: siteMetadata.description,
feed_url: siteMetadata.siteUrl + `/blog/rss.xml`,
site_url: siteMetadata.siteUrl,
};
},
query: `
{
allMarkdownRemark(
sort: { order: DESC, fields: [fields___date] }
filter: { fileAbsolutePath: { regex: "/pages/blog/" } }
) {
edges {
node {
excerpt
fields {
date
slug
}
frontmatter {
title
author {
id
}
}
}
}
}
}
`,
output: '/blog/rss.xml',
title: `${siteMetadata.title} - Blog`,
},
],
},
},
'gatsby-plugin-netlify-cms',
'gatsby-plugin-react-helmet',
'gatsby-plugin-remove-trailing-slashes',
'gatsby-transformer-json',
{
resolve: 'gatsby-source-filesystem',
options: {
name: 'data',
path: `${__dirname}/src/data`,
},
},
{
resolve: 'gatsby-source-filesystem',
options: {
name: 'assets',
path: `${__dirname}/static/assets`,
},
},
{
resolve: 'gatsby-source-filesystem',
options: {
name: 'posts',
path: `${__dirname}/src/pages/blog/`,
},
},
{
resolve: 'gatsby-source-filesystem',
options: {
name: 'news',
path: `${__dirname}/src/pages/news/`,
},
},
// 'gatsby-plugin-sitemap',
'gatsby-plugin-netlify-cms-paths',
'gatsby-plugin-sharp',
{
resolve: 'gatsby-transformer-remark',
options: {
plugins: [
'gatsby-plugin-netlify-cms-paths',
{
resolve: 'gatsby-remark-images',
options: {
linkImagesToOriginal: false,
maxWidth: 1200,
quality: 75,
},
},
{
resolve: 'gatsby-remark-autolink-headers',
options: {
removeAccents: true,
},
},
],
},
},
'gatsby-plugin-catch-links',
'gatsby-transformer-sharp',
{
resolve: 'gatsby-mdx',
options: {
defaultLayouts: {
default: require.resolve('./src/templates/page.jsx'),
},
},
},
{
resolve: 'gatsby-plugin-purgecss',
options: {
extractors: [
{
extractor: TailwindExtractor,
extensions: ['js', 'jsx'],
},
],
whitelist: ['___gatsby', 'ol', 'h2', 'h3'],
whitelistPatterns: [/^icon\-/, /^marker/],
},
},
{
resolve: 'gatsby-plugin-manifest',
options: {
name: 'Paralelná Polis Košice',
short_name: 'PPKE',
start_url: '/',
background_color: '#ffffff',
theme_color: '#000000',
display: 'standalone',
icons: [
{
src: `/android-chrome-192x192.png`,
sizes: `192x192`,
type: `image/png`,
},
{
src: `/android-chrome-512x512.png`,
sizes: `512x512`,
type: `image/png`,
},
],
},
},
// 'gatsby-plugin-offline', // Disabled as new content need hard refresh
'gatsby-plugin-remove-serviceworker',
// Disabled until FB API token resolved
// {
// resolve: `gatsby-source-facebook`,
// options: {
// places: ['782479115289415'], // Can be either a numeric ID or the URL ID
// params: {
// fields:
// 'events { id, name, description, start_time, end_time, place { id, name } }',
// },
// key: process.env.FACEBOOK_ACCESS_TOKEN,
// version: '7.0',
// },
// },
// Disabled until FB Instagram API works as expected again...
// {
// resolve: 'gatsby-source-instagram',
// options: {
// username: '7188082683',
// },
// },
'gatsby-plugin-react-leaflet',
];
const mapping = {
'MarkdownRemark.frontmatter.author': 'AuthorJson',
};
/**
* Adds Google Analytics only to live production site
*
* `CONTEXT` comes from Netlify build process
* @see https://www.netlify.com/docs/continuous-deployment/#build-environment-variables
*/
if (process.env.CONTEXT === 'production') {
plugins.push({
resolve: 'gatsby-plugin-google-analytics',
options: {
trackingId: 'UA-124036846-1',
head: true,
respectDNT: true,
},
});
}
module.exports = {
pathPrefix: `/blog`,
siteMetadata,
plugins,
mapping,
};