forked from AI-Global/rai-website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gatsby-config.js
97 lines (93 loc) · 2.1 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
/**
* Disabling no-var-requires here as this is a node file.
* There is probably a better way to do this that we should
* look into at some point.
*/
// eslint-disable-next-line @typescript-eslint/no-var-requires
require("dotenv").config();
const plugins = [
`gatsby-plugin-image`,
`gatsby-transformer-sharp`,
`gatsby-plugin-react-helmet`,
`gatsby-plugin-sitemap`,
`gatsby-plugin-sharp`,
{
resolve: `gatsby-plugin-postcss`,
options: {
cssLoaderOptions: {
esModule: false,
modules: {
namedExport: false,
},
},
},
},
{
resolve: `gatsby-plugin-social9-socialshare`,
options: {
content: process.env.SOCIAL_SHARE,
async: true,
defer: true,
},
},
{
resolve: `gatsby-plugin-manifest`,
options: {
icon: `src/images/icon.png`,
},
},
{
resolve: `gatsby-plugin-sharp`,
options: {
defaults: {},
failOnError: true,
base64Width: 20,
forceBase64Format: `png`,
useMozJpeg: process.env.GATSBY_JPEG_ENCODER === `MOZJPEG`,
stripMetadata: true,
defaultQuality: 100,
},
},
{
resolve: "gatsby-source-filesystem",
options: {
name: "images",
path: "./src/images/",
},
__key: "images",
},
{
resolve: `gatsby-plugin-google-gtag`,
options: {
trackingIds: [process.env.GA4_TAG],
pluginConfig: {
head: true,
},
},
},
];
/**
* The site is useless without Contentful, lets kill the process
* if Contentful is not set up
*/
if (process.env.CONTENTFUL_TOKEN && process.env.CONTENTFUL_SPACE) {
plugins.push({
resolve: `gatsby-source-contentful`,
options: {
accessToken: process.env.CONTENTFUL_TOKEN,
spaceId: process.env.CONTENTFUL_SPACE,
},
});
} else {
throw Error("Contentful is not set up. Set up contentful before continuing");
}
module.exports = {
siteMetadata: {
title: "Responsible AI",
description:
"Working together, we can create AI systems the world can trust.",
author: "Responsible AI",
siteUrl: "https://www.responsible.ai/",
},
plugins,
};