This repository has been archived by the owner on Nov 15, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 42
/
gatsby-config.js
152 lines (150 loc) · 4.28 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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
const path = require(`path`)
let activeEnv = process.env.ACTIVE_ENV || process.env.NODE_ENV || 'development'
/**
* Access environmental variables
*/
require('dotenv').config({
path: `.env.${activeEnv}`,
})
module.exports = {
siteMetadata: {
title: `WPGraphQL`,
description: `Documentation and marketing site for WPGraphQL. Built with Gatsby.`,
author: `@wpgraphql`,
},
plugins: [
{
resolve: 'gatsby-plugin-antd',
options: {
style: true,
},
},
`gatsby-plugin-sharp`,
{
resolve: `gatsby-mdx`,
options: {
defaultLayouts: {
default: path.resolve('./src/components/SiteLayout.js')
},
gatsbyRemarkPlugins: [
{
resolve: `gatsby-remark-images`,
options: {
maxWidth: 1035,
sizeByPixelDensity: true
}
},
{
resolve: "gatsby-remark-copy-linked-files",
},
{
resolve: `gatsby-transformer-remark`,
options: {
plugins: [`gatsby-remark-autolink-headers`],
},
}
]
},
},
{
resolve: 'gatsby-plugin-less',
options: {
javascriptEnabled: true,
modifyVars: {
// DEFAULTS FOR ANT DESIGN
// Full list of variables can be found here:
// https://github.com/ant-design/ant-design/blob/master/components/style/themes/default.less
// @primary-color: #1890ff;
'layout-header-background': '#0E2339',
// primary color for all components
'primary-color': '#1890ff',
// @link-color: #1890ff;
'link-color': '#1890ff',
// @success-color: #52c41a;
'success-color': '#52c41a',
// @warning-color: #faad14;
'warning-color': '#faad14',
// @error-color: #f5222d;
'error-color': '#f5222d',
// @font-size-base: 14px;
// major text font size
'font-size-base': '16px',
// @heading-color: rgba(0, 0, 0, .85);
'heading-color': 'rgba(0, 0, 0, .85)',
// @text-color: rgba(0, 0, 0, .65);
'text-color': 'rgba(0, 0, 0, .65)',
// @text-color-secondary : rgba(0, 0, 0, .45);
'text-color-secondary': 'rgba(0, 0, 0, .45)',
// @disabled-color : rgba(0, 0, 0, .25);
'disabled-color': 'rgba(0, 0, 0, .25)',
// @border-radius-base: 4px;
'border-radius-base': '4px',
// @border-color-base: #d9d9d9;
'border-color-base': '#d9d9d9',
// @box-shadow-base: 0 2px 8px rgba(0, 0, 0, .15);
'box-shadow-base': '0 2px 8px rgba(0, 0, 0, .15)',
},
},
},
{
resolve: 'gatsby-source-graphql',
options: {
// This type will contain remote schema Query type
typeName: 'SWAPI',
// This is field under which it's accessible
fieldName: 'swapi',
// Url to query from
url: 'https://api.graphcms.com/simple/v1/swapi',
},
},
{
resolve: `gatsby-source-graphql`,
options: {
typeName: 'GitHub',
fieldName: 'github',
// Url to query from
url: 'https://api.github.com/graphql',
// HTTP headers
headers: {
// Learn about environment variables: https://gatsby.app/env-vars
Authorization: `bearer ${process.env.GITHUB_TOKEN}`,
},
},
},
`gatsby-plugin-react-helmet`,
{
resolve: `gatsby-source-filesystem`,
options: {
name: `images`,
path: `${__dirname}/src/images`,
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
path: `${__dirname}/src/content`,
name: 'content'
}
},
`gatsby-transformer-sharp`,
`gatsby-plugin-sharp`,
{
resolve: `gatsby-plugin-manifest`,
options: {
name: `gatsby-starter-default`,
short_name: `starter`,
start_url: `/`,
background_color: `#0E2339`,
theme_color: `#0E2339`,
display: `minimal-ui`,
icon: `src/images/icon.png`, // This path is relative to the root of the site.
},
},
{
resolve: `gatsby-plugin-google-analytics`,
options: {
trackingId: 'UA-111783024-1'
}
},
],
}