-
Notifications
You must be signed in to change notification settings - Fork 0
/
gatsby-config.js
78 lines (77 loc) · 2.17 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
const languages = require('./src/locales/languages')
const EN = require('./src/locales/en')
const ZH = require('./src/locales/zh')
require('dotenv').config({
path: `.env.${process.env.NODE_ENV}`,
})
const { createProxyMiddleware } = require('http-proxy-middleware')
module.exports = {
siteMetadata: {
title: `让少数派变成同好圈`,
description: `在这里,您可以加入校园俱乐部、游戏群组,或是世界级艺术社区。在这里,您也能邀三五好友一起共度欢乐时光。在这里,您可以轻而易举地每日谈天说地,时常消遣娱乐。`,
author: `pupu`,
siteUrl: `https://hangoutmain.gatsbyjs.io/`,
languages,
EN,
ZH,
},
developMiddleware: (app) => {
app.use(
'/api',
createProxyMiddleware({
target: 'http://localhost:3000',
changeOrigin: true,
pathRewrite: {
'^/api': '',
},
})
)
},
plugins: [
`gatsby-plugin-react-helmet`,
`gatsby-plugin-image`,
'gatsby-plugin-sass',
'gatsby-plugin-postcss',
{
resolve: `gatsby-source-filesystem`,
options: {
name: `images`,
path: `${__dirname}/src/images`,
},
},
`gatsby-transformer-sharp`,
`gatsby-plugin-sharp`,
{
resolve: `gatsby-plugin-manifest`,
options: {
name: `哔啵`,
short_name: `哔啵`,
start_url: `/`,
background_color: `#36393f`,
theme_color: `#36393f`,
display: `minimal-ui`,
icon: `src/images/gatsby-icon.png`, // This path is relative to the root of the site.
},
},
`gatsby-plugin-gatsby-cloud`,
'gatsby-plugin-use-query-params',
// this (optional) plugin enables Progressive Web App + Offline functionality
// To learn more, visit: https://gatsby.dev/offline
// `gatsby-plugin-offline`,
{
resolve: 'gatsby-plugin-webpack-bundle-analyser-v2',
options: {
devMode: true,
},
},
{
resolve: 'gatsby-plugin-i18n',
options: {
langKeyForNull: 'any',
langKeyDefault: languages.defaultLangKey,
useLangKeyLayout: false,
prefixDefault: false,
},
},
],
}