-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gatsby-config.ts
104 lines (100 loc) · 2.67 KB
/
gatsby-config.ts
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
/*
* Copyright (C) 2021-present Rong "Mantle" Bao
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see https://www.gnu.org/licenses/ .
*/
import { defaultLang, langs } from "./src/i18n"
import { PageID } from "./src/PageID"
import type { GatsbyConfig } from "gatsby"
const config: GatsbyConfig = {
plugins: [
"gatsby-plugin-typescript",
{
resolve: "gatsby-plugin-manifest",
options: {
name: "Periotris.js",
short_name: "Periotris.js",
start_url: "./",
display: "fullscreen",
icon: "static/Icon.png",
background_color: "#303030",
theme_color: "#7a84e8",
orientation: "landscape",
},
},
{
resolve: "gatsby-plugin-offline",
options: {
precachePages: ["/", "/404", "/about", "/game", "/settings"],
},
},
"gatsby-source-local-git",
"gatsby-source-package",
{
resolve: "gatsby-source-filesystem",
options: {
path: `${__dirname}/src/i18n/locales`,
name: "locale",
},
},
{
resolve: "gatsby-plugin-react-i18next",
options: {
languages: langs,
defaultLanguage: defaultLang,
i18nextOptions: {
fallbackLng: defaultLang,
supportedLngs: langs,
defaultNS: "common",
interpolation: {
escapeValue: false,
},
},
},
},
],
siteMetadata: {
title: "Periotris.js",
description:
"Learn the Periodic Table of Elements in a fun way, directly in your browsers.",
url: "https://csharpermantle.github.io/periotrisjs/",
navRoutes: [
{
id: PageID.PAGE_HOME,
path: "/",
},
{
id: PageID.PAGE_GAME,
path: "/game",
},
{
id: PageID.PAGE_AUTOPLAY,
path: "/autoplay",
},
{
id: PageID.PAGE_SETTINGS,
path: "/settings",
},
{
id: PageID.PAGE_ABOUT,
path: "/about",
},
],
},
pathPrefix: process.env.BUILD_ADD_PATH_PREFIX ? "/periotrisjs" : undefined,
graphqlTypegen: {
generateOnBuild: true,
},
}
export default config