-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgatsby-config.js
171 lines (169 loc) · 4.75 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
159
160
161
162
163
164
165
166
167
168
169
170
171
/**
* Configure your Gatsby site with this file.
*
* See: https://www.gatsbyjs.org/docs/gatsby-config/
*/
require("dotenv").config();
module.exports = {
siteMetadata: {
siteUrl: "https://www.fillingfoodspot.com",
author: "Yannick Pferr",
publisher: "Netlify",
title: "The Filling Food Spot ",
logoTitle: "the FILLING FOOD spot",
description: "The Filling Food Spot is a Blog about low calorie dense food! I want to show you the best recipes to really fill you up while also being delicious.",
image: "/images/logo.png",
bannerImage: "/images/banner.png",
blogPostsPerPage: 9,
social: {
instagram: "",
twitter: "",
},
mailchimpUrl: "https://gmail.us2.list-manage.com/subscribe/post?u=4496257eb2519fb7538da613f&id=3811aa9127",
commentsServerUrl: process.env.ENV && process.env.ENV == "DEV" ? "http://localhost:3000" : "https://oydzowvwze.execute-api.eu-central-1.amazonaws.com/dev"
},
plugins: [
{
resolve: `gatsby-source-contentful`,
options: {
spaceId: process.env.CONTENTFUL_SPACE_ID,
accessToken: process.env.ENV && process.env.ENV == "DEV" ? process.env.CONTENTFUL_PREVIEW_TOKEN : process.env.CONTENTFUL_DELIVERY_TOKEN,
host: process.env.ENV && process.env.ENV == "DEV" ? "preview.contentful.com" : "cdn.contentful.com"
},
},
"gatsby-plugin-sass",
"gatsby-plugin-sharp",
{
resolve: "gatsby-transformer-remark",
options: {
plugins: [
// gatsby-remark-relative-images must
// go before gatsby-remark-images
{
resolve: "gatsby-remark-relative-images",
},
{
resolve: "gatsby-remark-images",
options: {
maxWidth: 1000
},
},
{
resolve: "gatsby-remark-external-links",
options: {
target: "_blank",
rel: "noopener",
},
},
{
resolve: "gatsby-plugin-catch-links",
},
],
},
},
"gatsby-transformer-sharp",
/*{
resolve: "gatsby-plugin-feed",
options: {
query: `
{
site {
siteMetadata {
title
description
siteUrl
site_url: siteUrl
}
}
}
`,
feeds: [
{
serialize: ({ query: { site, allContentfulPost } }) => {
return allContentfulPost.edges.map(edge => {
return Object.assign({}, edge.node.frontmatter, {
custom_elements: [{ "content:encoded": edge.node.content.childMarkdownRemark.html }],
date: edge.node.date,
description: edge.node.previewText,
guid:
site.siteMetadata.siteUrl +
"/blog/" +
edge.node.title,
url:
site.siteMetadata.siteUrl +
"/blog/" +
edge.node.title,
})
})
},
query: `
{
allContentfulPost(
sort: { fields: createdAt, order: DESC }
){
edges {
node {
title
author {
name
}
createdAt
previewText
tags{
name
}
content {
json
}
}
}
}
}
`,
output: "/rss.xml",
title: "RSS Feed",
},
],
},
},*/
{
resolve: "gatsby-plugin-sitemap",
},
"gatsby-plugin-robots-txt",
"gatsby-plugin-react-helmet",
{
resolve: "gatsby-plugin-manifest",
options: {
// req props
name: "The Filling Food Spot",
short_name: "Filling Food Spot",
start_url: "/",
background_color: "#fff",
theme_color: "#ee6f57",
display: "minimal-ui",
// optional
icon: "static/images/logo.png",
include_favicon: false,
},
},
"gatsby-plugin-preact",
{
resolve: `gatsby-plugin-webfonts`,
options: {
fonts: {
google: [
{
family: "Rock Salt",
fontDisplay: 'swap',
strategy: 'selfHosted'
}
],
},
formats: ['woff2', 'woff'],
useMinify: true,
usePreload: true,
},
},
"gatsby-plugin-remove-serviceworker"
],
}