-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathgatsby-config.js
106 lines (103 loc) · 2.82 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('dotenv').config({
path: `.env`
});
const config = require('./config');
const pathPrefix = config.pathPrefix === '/' ? '' : config.pathPrefix;
module.exports = {
pathPrefix: config.pathPrefix,
siteMetadata: {
siteUrl: config.siteUrl + pathPrefix,
pathPrefix,
title: config.siteTitle,
titleAlt: config.siteTitleAlt,
description: config.siteDescription,
logo: config.siteLogo,
headline: config.siteHeadline,
siteLanguage: config.siteLanguage,
ogLanguage: config.ogLanguage,
author: config.author,
twitter: config.userTwitter,
facebook: config.ogSiteName,
privacyLink: config.privacyLink,
termsOfServiceLink: config.termsOfServiceLink,
cookiePolicyLink: config.cookiePolicyLink
},
plugins: [
'gatsby-plugin-react-helmet',
'gatsby-plugin-typescript',
{
resolve: `gatsby-plugin-intl`,
options: {
path: `${__dirname}/src/intl`,
languages: [
`ar`,
`el`,
`en`,
`es`,
`it`,
`ko`,
`pt-BR`,
`ru`,
`ta`,
`th`,
`tr`,
`zh-Hans`,
`zh-Hant`
],
defaultLanguage: `en`,
redirect: true
}
},
'gatsby-transformer-yaml',
{
resolve: 'gatsby-source-filesystem',
options: {
name: 'config',
path: `${__dirname}/config`
}
},
{
resolve: 'gatsby-source-filesystem',
options: {
name: 'images',
path: `${__dirname}/src/images`
}
},
{
resolve: 'gatsby-theme-firebase',
options: {
credentials: {
apiKey: process.env.GATSBY_API_KEY,
authDomain: process.env.GATSBY_AUTH_DOMAIN,
databaseURL: process.env.GATSBY_DATABASE_URL,
projectId: process.env.GATSBY_PROJECT_ID,
storageBucket: process.env.GATSBY_STORAGE_BUCKET,
messagingSenderId: process.env.GATSBY_MESSAGING_SENDER_ID,
appId: process.env.GATSBY_APP_ID,
measurementId: process.env.GATSBY_MEASUREMENT_ID
},
loginPath: false,
loginRedirectPath: '/me',
socialLogins: ['google', 'facebook']
}
},
'gatsby-plugin-sharp',
'gatsby-transformer-sharp',
'gatsby-plugin-sitemap',
{
resolve: 'gatsby-plugin-manifest',
options: {
name: config.siteTitle,
short_name: config.siteTitleShort,
description: config.siteDescription,
start_url: config.pathPrefix,
background_color: config.backgroundColor,
theme_color: config.themeColor,
display: 'standalone',
icon: 'src/images/favicon.png'
}
},
'gatsby-plugin-offline',
'gatsby-plugin-netlify'
]
};