-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgatsby-config.esm.js
59 lines (57 loc) · 1.37 KB
/
gatsby-config.esm.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
import * as path from "path"
import { Theme } from "./src/shared/theme"
module.exports = {
pathPrefix: "/minimal-resume-theme",
siteMetadata: {
siteUrl: makeSiteUrl(),
},
plugins: [
{
resolve: `gatsby-plugin-manifest`,
options: {
name: "Minimal Resume Theme",
short_name: "resume",
start_url: "/",
background_color: Theme.colors.white,
theme_color: Theme.colors.main,
display: "minimal-ui",
icon: "static/favicon.png",
},
},
`gatsby-plugin-offline`,
`gatsby-plugin-zopfli`,
`gatsby-plugin-sitemap`,
{
resolve: "gatsby-plugin-robots-txt",
options: {
env: {
development: {
policy: [{ userAgent: "*", disallow: ["/"] }],
},
production: {
policy: [{ userAgent: "*", allow: "/" }],
},
},
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `data`,
path: path.join(__dirname, `src`, `data`),
},
},
`gatsby-transformer-sharp`,
"gatsby-transformer-json",
`gatsby-plugin-sharp`,
"gatsby-plugin-remove-trailing-slashes",
`gatsby-plugin-preload-fonts`,
],
}
function makeSiteUrl() {
if (process.env.NODE_ENV === "production") {
return "https://dkarski.github.io/"
} else {
return "http://localhost:8000"
}
}