-
Notifications
You must be signed in to change notification settings - Fork 31
/
gatsby-config.js
158 lines (155 loc) · 3.32 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
153
154
155
156
157
158
const postcssCustomMedia = require(`postcss-custom-media`);
const autoprefixer = require(`autoprefixer`);
const cssVariables = require(`postcss-css-variables`);
const colorModFunction = require(`postcss-color-mod-function`);
const cssNano = require(`cssnano`);
const customProperties = require(`postcss-custom-properties`);
const easyImport = require(`postcss-easy-import`);
const path = require(`path`);
require(`dotenv`).config({
path: `.env.${process.env.NODE_ENV}`,
});
const plugins = [
{
resolve: `gatsby-source-filesystem`,
options: {
path: path.join(__dirname, `content`),
name: `markdown-pages`,
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
path: path.join(__dirname, `src`, `images`),
name: `images`,
},
},
`gatsby-plugin-sharp`,
`gatsby-plugin-image`,
`gatsby-transformer-sharp`,
{
resolve: `gatsby-transformer-remark`,
options: {
plugins: [
`gatsby-remark-autolink-headers`,
`gatsby-remark-code-titles`,
`gatsby-remark-check-links`,
`gatsby-remark-external-links`,
{
resolve: `gatsby-remark-images`,
options: {
withWebp: true,
},
},
`gatsby-remark-prismjs-copy-button`,
// Keep all the plugins before prismjs, which may affect the content due to code transformations
{
resolve: `gatsby-remark-prismjs`,
options: {
classPrefix: 'language-',
showLineNumbers: true,
aliases: {
js: 'javascript',
javascript: 'javascript',
html: 'html',
sh: 'bash',
curl: 'bash',
vue: 'vue',
},
},
},
],
},
},
`gatsby-transformer-yaml`,
`gatsby-plugin-catch-links`,
/**
* Utility Plugins
*/
{
resolve: `gatsby-plugin-manifest`,
options: {
name: `Reactivesearch Docs`,
short_name: `Reactivesearch`,
start_url: `/`,
background_color: `#343f44`,
theme_color: `#343f44`,
display: `minimal-ui`,
icon: `static/favicon.png`,
icons: [
{
src: `static/favicon.pngg`,
sizes: `192x192`,
type: `image/png`,
purpose: 'any maskable',
},
{
src: `static/favicon.png`,
sizes: `512x512`,
type: `image/png`,
},
],
},
},
`gatsby-plugin-offline`,
`gatsby-plugin-react-helmet`,
`gatsby-plugin-force-trailing-slashes`,
'gatsby-plugin-dark-mode',
`gatsby-offline-search-index`,
{
resolve: `gatsby-plugin-webpack-bundle-analyser-v2`,
options: {
disable: true,
},
},
// `gatsby-plugin-perf-budgets`,
/**
* Display Plugins
*/
{
resolve: `gatsby-plugin-postcss`,
options: {
postCssPlugins: [
autoprefixer({ browsers: [`last 2 versions`] }),
easyImport(),
cssVariables(),
colorModFunction(),
customProperties({ preserve: false }),
postcssCustomMedia(),
cssNano({ zindex: false }),
],
},
},
{
resolve: `gatsby-plugin-react-svg`,
options: {
rule: {
include: /icons/,
},
},
},
{
resolve: `gatsby-plugin-google-gtag`,
options: {
trackingIds: ['G-KB72HLEDRP'],
},
},
{
resolve: 'gatsby-plugin-page-progress',
options: {
excludePaths: ['/'],
height: 3,
prependToBody: false,
color: `#3eb0ef`,
},
},
];
module.exports = {
siteMetadata: {
title: `Reactivesearch.io Docs`,
siteUrl: `https://github.com/appbaseio/Docs`,
description: `Reactivesearch.io Docs Reference - Supercharge your search .`,
},
plugins,
pathPrefix: '/',
};