-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgatsby-config.js
86 lines (86 loc) · 2.83 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
/* eslint-disable */
const siteConfig = require("./site-config");
const activeEnv =
process.env.GATSBY_ACTIVE_ENV || process.env.NODE_ENV || "development";
console.log(`Using environment config: '${activeEnv}'`);
require("dotenv").config({
path: `.env.${activeEnv}`
});
module.exports = {
pathPrefix: siteConfig.pathPrefix,
siteMetadata: siteConfig.siteMetadata,
mapping: {
"ProjectsJson.client": "ClientsJson"
},
plugins: [
{
resolve: "gatsby-plugin-netlify-cache",
options: {
cachePublic: true
}
},
`gatsby-plugin-typescript`,
`gatsby-plugin-react-helmet`,
{
resolve: `gatsby-source-filesystem`,
options: {
path: `${__dirname}/static/assets`,
name: "uploads"
}
},
{
resolve: `gatsby-source-filesystem`,
options: {
path: `${__dirname}/src/pages`,
name: "pages"
}
},
{
resolve: `gatsby-source-twitter`,
options: {
credentials: {
consumer_key: process.env.TWITTER_CONSUMER_KEY,
consumer_secret: process.env.TWITTER_CONSUMER_SECRET,
bearer_token: process.env.TWITTER_CONSUMER_BEARER_TOKEN
},
queries: {
aerian: {
endpoint: "statuses/user_timeline",
params: {
screen_name: `aerianstudios`,
tweet_mode: "extended"
},
count: 1
}
}
}
},
// This plugin exposes helper functions for processing
// images with the NPM package “sharp”. It's used by
// several plugins and should preceed them.
`gatsby-plugin-sharp`,
// This plugin identifies file nodes that are images and
// transforms these to create new “ImageSharp” nodes.
// With them you can resize images and
// generate responsive image thumbnails.
`gatsby-transformer-sharp`,
// transform JSON file nodes
`gatsby-transformer-json`,
`gatsby-plugin-sass`,
{
resolve: `gatsby-plugin-netlify-cms`,
options: {
// One convention is to place your Netlify CMS customization code in a
// `src/cms` directory.
modulePath: `${__dirname}/src/cms/cms.ts`
}
},
// Manifest for AppCache and PWA compatibility
{
resolve: `gatsby-plugin-manifest`,
options: siteConfig.manifest
},
`gatsby-plugin-offline`,
`gatsby-plugin-netlify`
]
};