-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathgatsby-config.js
114 lines (110 loc) · 2.81 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
const config = require(`./site-config`)
const activeEnv =
process.env.GATSBY_ACTIVE_ENV || process.env.NODE_ENV || `development`
console.log(`Using environment config: "${activeEnv}"`)
require(`dotenv`).config({
path: `.env.${activeEnv}`,
})
module.exports = {
siteMetadata: {
title: `WhatJackHasMade`,
siteUrl: `https://whatjackhasmade.co.uk`,
description: `Award winning freelance fullstack website developer`,
},
plugins: [
// Simple config, passing URL
{
resolve: "gatsby-source-graphql",
options: {
// Arbitrary name for the remote schema Query type
typeName: "WORDPRESS",
// Field under which the remote schema will be accessible. You'll use this in your Gatsby query
fieldName: "wordpress",
// Url to query from
url: "https://wjhm.noface.app/graphql",
// refetch interval in seconds
// refetchInterval: 600,
},
},
`gatsby-source-bonus`,
`gatsby-plugin-typescript`,
`gatsby-plugin-tslint`,
`gatsby-plugin-favicon`,
`gatsby-plugin-sitemap`,
`gatsby-plugin-layout`,
`gatsby-plugin-lodash`,
`gatsby-plugin-offline`,
`gatsby-plugin-react-helmet`,
`gatsby-plugin-styled-components`,
`gatsby-transformer-sharp`,
`gatsby-plugin-sharp`,
{ resolve: `gatsby-source-filesystem`, options: { path: `./src/assets/` } },
{
resolve: `gatsby-plugin-hotjar`,
options: {
id: `1261093`,
sv: `6`,
},
},
{
resolve: `gatsby-plugin-google-analytics`,
options: {
trackingId: config.googleAnalyticsID,
},
},
{
resolve: `gatsby-plugin-react-svg`,
options: {
rule: {
include: /assets/,
},
},
},
{
resolve: `gatsby-plugin-html-attributes`,
options: {
lang: `en`,
},
},
{
resolve: `gatsby-plugin-netlify`,
options: {
mergeLinkHeaders: false,
mergeCachingHeaders: false,
},
},
{
resolve: `gatsby-plugin-robots-txt`,
options: {
host: `https://www.whatjackhasmade.co.uk`,
sitemap: `https://www.whatjackhasmade.co.uk/sitemap.xml`,
resolveEnv: () => activeEnv,
env: {
development: {
policy: [{ userAgent: `*`, disallow: [`/`] }],
},
production: {
policy: [
{
userAgent: `*`,
allow: `/`,
disallow: [`/inspiration`, `/assets`, `/client/*`, `/twitter`],
},
],
},
},
},
},
{
resolve: `gatsby-plugin-polyfill-io`,
options: {
features: [
`Array.prototype.map`,
`fetch`,
`IntersectionObserver`,
`IntersectionObserverEntry`,
],
},
},
],
}