-
Notifications
You must be signed in to change notification settings - Fork 10
/
gatsby-config.js
77 lines (76 loc) · 2.17 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
const path = require('path');
const tailwindConfig = require('./tailwind.config.js');
module.exports = {
siteMetadata: {
title: `Golang Vietnam`,
description: `Golang Community in Vietnam.`,
author: `@golang-vietnam`
},
pathPrefix: `/img`,
plugins: [
`gatsby-plugin-react-helmet`,
{
resolve: 'gatsby-source-filesystem',
options: {
path: `${__dirname}/sources`,
name: 'sources'
}
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `images`,
path: `${__dirname}/src/images`
}
},
{
resolve: 'gatsby-transformer-remark',
options: {
plugins: []
}
},
`gatsby-transformer-sharp`,
`gatsby-plugin-sharp`,
{
resolve: `gatsby-plugin-manifest`,
options: {
name: `golang-community-in-vietname`,
short_name: `golang-vietnam`,
start_url: `/`,
background_color: `#3BA2BC`,
theme_color: `#3BA2BC`,
display: `minimal-ui`,
icon: `src/images/gopher-icon.png` // This path is relative to the root of the site.
}
},
// this (optional) plugin enables Progressive Web App + Offline functionality
// To learn more, visit: https://gatsby.app/offline
// 'gatsby-plugin-offline',
{
resolve: 'gatsby-plugin-root-import',
options: {
sources: path.join(__dirname, 'sources/'),
root: path.join(__dirname, 'src/'),
containers: path.join(__dirname, 'src/containers'),
components: path.join(__dirname, 'src/components'),
utils: path.join(__dirname, 'src/utils'),
assets: path.join(__dirname, 'src/assets'),
css: path.join(__dirname, 'src/css'),
shared: path.join(__dirname, 'src/shared'),
data: path.join(__dirname, 'src/data'),
images: path.join(__dirname, 'src/images')
}
},
`gatsby-plugin-styled-components`,
{
resolve: `gatsby-plugin-postcss`,
options: {
postCssPlugins: [
require(`tailwindcss`)(tailwindConfig),
require(`autoprefixer`),
...(process.env.NODE_ENV === `production` ? [require(`cssnano`)] : [])
]
}
}
]
};