-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgatsby-config.js
More file actions
126 lines (124 loc) · 3.57 KB
/
gatsby-config.js
File metadata and controls
126 lines (124 loc) · 3.57 KB
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
"use strict";
// eslint-disable-next-line import/extensions
const siteConfig = require("./config.js");
module.exports = {
siteMetadata: {
title: siteConfig.title,
siteUrl: siteConfig.siteUrl,
description: siteConfig.description,
author: siteConfig.author,
copyright: siteConfig.copyright,
policyDate: siteConfig.policyDate,
email: siteConfig.email,
headline: siteConfig.headline,
driftId: siteConfig.driftId,
social: {
linkedin: true,
github: true,
angel: true,
},
},
plugins: [
// This plugin exposes helper functions for processing
// images with the NPM package “sharp”. It's used by
// several other plugins.
"gatsby-plugin-sharp",
// This plugin identifies file nodes that are images and
// transforms these to create new “ImageSharp” nodes.
// With them you can resize images and
// generate responsive image thumbnails.
"gatsby-transformer-sharp",
// This plugin takes your configuration and generates a
// web manifest file so the site can be added to your
// homescreen on Android.
{
resolve: "gatsby-plugin-manifest",
options: {
name: siteConfig.title,
short_name: siteConfig.title,
start_url: "/",
background_color: "#f7f7f7",
theme_color: "#191919",
display: "minimal-ui",
icon: "src/assets/logo.png",
},
},
// configure node-saas
"gatsby-plugin-sass",
// intercepts all local links that have not been created in React using gatsby-link
"gatsby-plugin-catch-links",
// This plugin generates a service worker and AppShell
// html file so the site works offline and is otherwise
// resistant to bad networks. Works with almost any
// site!
"gatsby-plugin-offline",
// This plugin sets up gTag for you.
{
resolve: "gatsby-plugin-google-gtag",
options: {
trackingIds: [siteConfig.googleAnalyticsId],
pluginConfig: {
head: true,
},
},
},
// configure site fonts
{
resolve: "gatsby-plugin-typography",
options: {
pathToConfigModule: "src/utils/typography",
},
},
// Create a sitemap for your Gatsby site
// (only runs on production - yarn run buid && gatsby serve)
{
resolve: "gatsby-plugin-sitemap",
options: {
query: `
{
site {
siteMetadata {
siteUrl
}
}
allSitePage(
filter: {
path: { regex: "/^(?!/404/|/404.html|/dev-404-page/)/" }
}
) {
edges {
node {
path
}
}
}
}
`,
output: "/sitemap.xml",
serialize: ({ site, allSitePage }) =>
allSitePage.edges.map((edge) => ({
url: site.siteMetadata.siteUrl + edge.node.path,
changefreq: "daily",
priority: 0.7,
})),
},
},
// youtube like progress when loading pages
{
resolve: "gatsby-plugin-nprogress",
options: {
// Setting a color is optional.
color: "tomato",
// Disable the loading spinner.
showSpinner: false,
},
},
// add seo tags
"gatsby-plugin-react-helmet",
// Create robots.txt
"gatsby-plugin-robots-txt",
// Automatically generates a _headers file and a _redirects file
// at the root of the public folder to configure HTTP headers and redirects on Netlify.
"gatsby-plugin-netlify",
],
};