This repository has been archived by the owner on Apr 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
gatsby-config.js
115 lines (112 loc) · 3.26 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
require('dotenv').config();
module.exports = {
siteMetadata: {
title: `aoestats`,
description: `aoestats aggregates the latest ranked matches for Age of Empires II and provides in-depth data and statistics on a civilization basis; stats include: win rate, play rate, win rate vs. game length, and more!`,
author: `@jerkeeler`,
siteUrl: `https://aoestats.io`,
},
plugins: [
// ====================
// SITE METADATA
// ====================
`gatsby-plugin-react-helmet`,
{
resolve: `gatsby-plugin-manifest`,
options: {
name: `aoestats`,
short_name: `aoestats`,
start_url: `/`,
background_color: `#1b96b4`,
theme_color: `#24d1f8`,
display: `minimal-ui`,
icon: `src/images/aoestats.png`, // This path is relative to the root of the site.
},
},
{
resolve: `gatsby-plugin-google-analytics`,
options: {
trackingId: 'UA-108069665-2',
anonymize: true,
},
},
{
resolve: `gatsby-plugin-sitemap`,
options: {
exclude: [`/contact/success`],
},
},
{
resolve: `gatsby-plugin-robots-txt`,
options: {
sitemap: `https://aoestats.io/sitemap.xml`,
policy: [
{
userAgent: '*',
allow: '/',
disallow: ['/contact/success'],
},
],
},
},
// this (optional) plugin enables Progressive Web App + Offline functionality
// To learn more, visit: https://gatsby.dev/offline
// `gatsby-plugin-offline`,
// =====================
// STYLING
// =====================
{
resolve: `gatsby-plugin-postcss`,
options: {
postCssPlugins: [
require(`postcss-preset-env`)({ stage: 0 }),
require('tailwindcss'),
],
},
},
// this (optional) plugin enables Progressive Web App + Offline functionality
// To learn more, visit: https://gatsby.dev/offline
// `gatsby-plugin-offline`,
{
resolve: `gatsby-plugin-purgecss`,
options: {
printRejected: true, // Print removed selectors and processed file names
// develop: true, // Enable while using `gatsby develop`
tailwind: true,
whitelist: [
'text-stats-high',
'text-stats',
'text-stats-low',
'bg-stats-high',
'bg-stats-medium',
'bg-stats-low',
], // Don't remove this selector
// ignore: ['/ignored.css', 'prismjs/', 'docsearch.js/'], // Ignore files/folders
// purgeOnly : ['components/', '/main.css', 'bootstrap/'], // Purge only these files/folders
},
},
// =====================
// CONTENT
// =====================
{
resolve: `gatsby-source-filesystem`,
options: {
name: `images`,
path: `${__dirname}/src/images`,
},
},
`gatsby-transformer-sharp`,
`gatsby-plugin-sharp`,
{
resolve: 'gatsby-source-pg',
options: {
connectionString:
`postgres://${process.env.PG_USER}:` +
`${process.env.PG_PASS}@${process.env.PG_HOST}:` +
`${process.env.PG_PORT}/${process.env.PG_DB}`,
schema: 'public',
refetchInterval: 60, // Refetch data every 60 seconds
},
},
],
};