-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgatsby-config.js
117 lines (115 loc) · 2.92 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
import dotenv from 'dotenv';
dotenv.config({ path: '.env' });
module.exports = {
plugins: [
// 'gatsby-plugin-less',
'gatsby-plugin-react-helmet',
// {
// resolve: 'gatsby-plugin-create-client-paths',
// options: { prefixes: ['/cmi/*', '/pl/cmi/*'] },
// },
'gatsby-transformer-json',
{
resolve: `gatsby-source-filesystem`,
options: {
path: `${__dirname}/src/data`,
name: 'data',
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
path: `${__dirname}/src/sources`,
name: 'sources',
},
},
{
resolve: 'gatsby-transformer-remark',
options: {
plugins: [
{
resolve: 'gatsby-remark-images',
options: {
maxWidth: 800,
},
},
{
resolve: 'gatsby-remark-attributes',
options: {
mode: 'cmi',
className: 'omit',
},
},
'gatsby-remark-numbered-footnotes',
],
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `images`,
path: `${__dirname}/src/assets/images`,
},
},
{
resolve: `gatsby-plugin-react-i18next`,
options: {
path: `${__dirname}/locales`,
languages: [`en`, `pl`],
defaultLanguage: `en`,
debug: true,
redirect: false,
siteUrl: 'https://www.christmind.info',
pages: [
{
matchPath: '/:lang?/pwom/:book?/:unit?',
getLanguageFromPath: true,
languages: ['pl'],
},
{
matchPath: '/:lang?/acim/oe/:book?/:unit?',
getLanguageFromPath: true,
languages: ['en'],
},
{
matchPath: '/:lang?/acim/sp/:book?/:unit?',
getLanguageFromPath: true,
languages: ['en'],
},
{
matchPath: '/:lang?/wom/:book?/:unit?',
getLanguageFromPath: true,
languages: ['en'],
},
{
matchPath: '/:lang?/raj/:book?/:unit?',
getLanguageFromPath: true,
languages: ['en'],
},
{
matchPath: '/acq/:page',
getLanguageFromPath: false,
languages: ['en', 'pl'],
},
{
matchPath: '/index',
getLanguageFromPath: false,
languages: ['en', 'pl'],
},
],
// you can pass any i18next options
// pass following options to allow message content as a key
i18nextOptions: {
interpolation: {
escapeValue: false, // not needed for react as it escapes by default
},
keySeparator: false,
nsSeparator: false,
},
},
},
`gatsby-plugin-sharp`,
`gatsby-transformer-sharp`,
'gatsby-plugin-catch-links',
],
};