forked from cpinitiative/usaco-guide
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gatsby-config.ts
155 lines (151 loc) · 3.88 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
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
require('dotenv').config();
const flags = {
FAST_DEV: true,
};
const siteMetadata = {
title: `USACO Guide`,
description: `A free collection of curated, high-quality competitive programming resources to take you from USACO Bronze to USACO Platinum and beyond. Written by top USACO Finalists, these tutorials will guide you through your competitive programming journey.`,
author: `@usacoguide`,
siteUrl: `https://usaco.guide/`,
keywords: ['USACO', 'Competitive Programming', 'USACO Guide'],
};
const plugins = [
{
resolve: 'gatsby-plugin-sitemap',
options: {
excludes: ['/license/', '/editor/'],
},
},
{
resolve: `gatsby-plugin-typescript`,
options: {
allowNamespaces: true,
},
},
/* any images referenced by .mdx needs to be loaded before the mdx file is loaded. */
{
resolve: `gatsby-source-filesystem`,
options: {
path: `${__dirname}/src/assets`,
name: `assets`,
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
path: `${__dirname}/content`,
name: `content-images`,
ignore: [`**/*.json`, `**/*.mdx`],
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
path: `${__dirname}/solutions`,
name: `solution-images`,
ignore: [`**/*.json`, `**/*.mdx`],
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
path: `${__dirname}/content`,
name: `content`,
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
path: `${__dirname}/solutions`,
name: `solutions`,
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
path: `${__dirname}/announcements`,
name: `announcements`,
},
},
`gatsby-plugin-image`,
`gatsby-plugin-sharp`,
{
resolve: `gatsby-plugin-postcss`,
},
`gatsby-plugin-styled-components`,
`gatsby-plugin-react-helmet`,
`gatsby-plugin-catch-links`,
`gatsby-transformer-sharp`,
{
resolve: `gatsby-plugin-manifest`,
options: {
name: `USACO Guide`,
short_name: `USACO`,
start_url: `/`,
background_color: `#113399`,
theme_color: `#113399`,
display: `minimal-ui`,
icon: `src/assets/logo-square.png`, // This path is relative to the root of the site.
},
},
{
resolve: `gatsby-plugin-google-gtag`,
options: {
trackingIds: ['G-1JGYFFBHXN'],
pluginConfig: {
head: false,
},
},
},
{
resolve: '@sentry/gatsby',
options: {
dsn: 'https://2e28bddc353b46e7bead85347a099a04@o423042.ingest.sentry.io/5352677',
denyUrls: [/extensions\//i, /^chrome:\/\//i],
...(process.env.NODE_ENV === 'production'
? {}
: {
defaultIntegrations: false,
}),
},
},
{
// This plugin must be placed last in your list of plugins to ensure that it can query all the GraphQL data
resolve: 'gatsby-plugin-algolia',
options: {
appId: process.env.ALGOLIA_APP_ID,
apiKey: process.env.ALGOLIA_API_KEY,
queries: require('./src/utils/algolia-queries'),
enablePartialUpdates: true,
skipIndexing: !process.env.ALGOLIA_APP_ID,
},
},
// devMode currently has some sketchy output
// See https://github.com/JimmyBeldone/gatsby-plugin-webpack-bundle-analyser-v2/issues/343
// {
// resolve: 'gatsby-plugin-webpack-bundle-analyser-v2',
// options: {
// devMode: false,
// },
// },
// {
// resolve: `gatsby-plugin-hotjar`,
// options: {
// includeInDevelopment: false, // optional parameter to include script in development
// id: 2173658,
// sv: 6,
// },
// },
`gatsby-plugin-meta-redirect`,
// this (optional) plugin enables Progressive Web App + Offline functionality
// To learn more, visit: https://gatsby.dev/offline
// `gatsby-plugin-offline`,
];
module.exports = {
flags,
siteMetadata,
plugins,
graphqlTypegen: {
generateOnBuild: true,
},
};