-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathgatsby-config.js
130 lines (128 loc) · 3.37 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
const path = require('path');
require('dotenv').config({
path: `.env.${process.env.NODE_ENV}`,
});
/**
* @type {import('gatsby').GatsbyConfig}
*/
module.exports = {
siteMetadata: {
title: `KL React`,
description: `Reacting in Kuala Lumpur, Malaysia`,
url: `https://kl-react.com`,
siteUrl: `https://kl-react.com`,
twitter: `@KlReact`,
keywords: [`reactjs`, `react developer`, `kuala lumpur`, `meetup`],
},
plugins: [
'gatsby-plugin-postcss',
`gatsby-plugin-emotion`,
`gatsby-plugin-react-helmet`,
`gatsby-plugin-theme-ui`,
{
resolve: `gatsby-plugin-mdx`,
options: {
extensions: ['.mdx', '.md'],
defaultLayouts: {
default: require.resolve('./src/templates/note-template.js'),
},
gatsbyRemarkPlugins: [
{
resolve: `gatsby-remark-images`,
options: {
maxWidth: 800,
withWebp: true,
},
},
],
},
},
`gatsby-plugin-catch-links`,
{
resolve: `gatsby-source-meetup`,
options: {
groupUrlName: 'kl-react',
status: 'upcoming,past',
desc: 'true',
fields: 'rsvp_rules,featured_photo',
},
},
process.env.AWS_ACCESS_KEY && {
resolve: `gatsby-source-s3-image`,
options:
process.env.NODE_ENV === 'production'
? {
accessKeyId: process.env.AWS_ACCESS_KEY,
secretAccessKey: process.env.AWS_SECRET_ACCESS,
bucketName: 'kl-react-photos',
protocol: 'https',
region: 'us-east-2',
}
: {
accessKeyId: process.env.AWS_ACCESS_KEY,
secretAccessKey: process.env.AWS_SECRET_ACCESS,
bucketName: 'kl-react-meetup-dev',
protocol: 'https',
region: 'ap-southeast-1',
},
},
process.env.TWITTER_CONSUMER_KEY && {
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_BEARER_TOKEN,
},
queries: {
reacttweets: {
endpoint: 'favorites/list',
params: {
screen_name: 'KlReact',
count: 50,
tweet_mode: 'extended',
include_ext_alt_text: true,
},
},
},
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `image`,
path: path.resolve(__dirname, 'og-image'),
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `contents`,
path: path.resolve(__dirname, 'src', 'contents'),
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
path: 'src/data',
name: 'data',
},
},
`gatsby-plugin-sharp`,
`gatsby-transformer-yaml`,
`gatsby-transformer-sharp`,
{
resolve: `gatsby-plugin-manifest`,
options: {
name: `KL React`,
short_name: `KL React`,
background_color: `#33e`,
theme_color: `#33e`,
icon: `og-image/durian-react-1x1.png`,
display: `standalone`,
},
},
`gatsby-plugin-netlify`,
`gatsby-plugin-advanced-sitemap`,
].filter(Boolean),
};