-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgatsby-config.js
89 lines (86 loc) · 2.15 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
const { config } = require('dotenv')
config()
const oneWeekAgo = new Date()
oneWeekAgo.setDate(oneWeekAgo.getDate() - 7)
const oneWeekAgoSeconds = Math.floor(oneWeekAgo.getTime() / 1000)
module.exports = {
siteMetadata: {
title: 'Jack Cross',
url: process.env.URL,
},
plugins: [
'gatsby-plugin-react-helmet',
'gatsby-plugin-emotion',
'gatsby-transformer-sharp',
'gatsby-plugin-sharp',
{
resolve: 'gatsby-source-foursquare-checkins',
options: {
beforeTimestamp: oneWeekAgoSeconds,
token: process.env.FOURSQUARE_ACCESS_TOKEN,
staticMap: {
zoom: '15',
size: '400x400',
scale: '2',
maptype: 'roadmap',
key: process.env.GOOGLE_KEY,
},
},
},
// {
// resolve: 'gatsby-source-goodreads-shelves',
// options: {
// key: process.env.GOODREADS_KEY,
// },
// },
{
resolve: 'gatsby-source-unsplash-user',
options: {
key: process.env.UNSPLASH_KEY,
user: 'crossprocess',
},
},
{
resolve: 'gatsby-source-spotify-top-artists',
options: {
refreshToken: process.env.SPOTIFY_REFRESH_TOKEN,
clientId: process.env.SPOTIFY_CLIENT_ID,
clientSecret: process.env.SPOTIFY_CLIENT_SECRET,
},
},
{
resolve: 'gatsby-source-graphql',
options: {
typeName: 'GitHub',
fieldName: 'github',
url: 'https://api.github.com/graphql',
headers: {
// Learn about environment variables: https://gatsby.dev/env-vars
Authorization: `bearer ${process.env.GITHUB_ACCESS_TOKEN}`,
},
},
},
{
resolve: 'gatsby-source-filesystem',
options: {
name: 'images',
path: `${__dirname}/images`,
},
},
{
resolve: `gatsby-plugin-google-analytics`,
options: {
trackingId: 'UA-131786655-1',
},
},
'gatsby-transformer-favicons',
{
resolve: 'gatsby-transformer-og-image',
options: {
fontPath: './fonts/Rubik-Regular.ttf',
fontColor: '#000000',
backgroundColor: '#ffffff',
},
},
],
}