-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgatsby-config.js
88 lines (87 loc) · 2.34 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
// support for .env, .env.development, and .env.production
require("dotenv").config()
require("dotenv").config({
path: `.env.${process.env.NODE_ENV}`,
})
module.exports = {
siteMetadata: {
siteUrl: "https://gatsbycontentfulhomepage.gatsbyjs.io/",
title: "Gatsby Contentful Homepage Starter",
author: `Gatsby`,
description: "A Gatsby Starter for building homepages with Contentful",
},
plugins: [
{
resolve: "gatsby-source-contentful",
options: {
downloadLocal: true,
spaceId: process.env.CONTENTFUL_SPACE_ID,
accessToken: process.env.CONTENTFUL_ACCESS_TOKEN,
host: process.env.CONTENTFUL_HOST,
},
},
"gatsby-plugin-sharp",
"gatsby-plugin-image",
"gatsby-transformer-sharp",
"gatsby-plugin-react-helmet",
"gatsby-plugin-vanilla-extract",
{
resolve: `gatsby-plugin-styled-components`,
options: {},
},
{
resolve: "gatsby-plugin-manifest",
options: {
name: "Gatsby Starter Contentful Homepage",
short_name: "Gatsby",
start_url: "/",
// These can be imported once ESM support lands
background_color: "#ffe491",
theme_color: "#004ca3",
icon: "src/images/logo-square.png",
},
},
{
resolve: `gatsby-transformer-remark`,
options: {
footnotes: true,
gfm: true,
plugins: [
{
resolve: "gatsby-remark-embed-video",
options: {
width: 1136,
ratio: 1.77,
related: false,
noIframeBorder: true,
urlOverrides: [
{
id: "youtube",
embedURL: (videoId) =>
`https://www.youtube-nocookie.com/embed/${videoId}`,
},
],
containerClass: "embedVideo-container",
},
},
{
resolve: "gatsby-remark-images-contentful",
options: {
maxWidth: 1136,
linkImagesToOriginal: false,
withWebp: true,
},
},
"gatsby-remark-responsive-iframe",
],
},
},
{
resolve: `gatsby-plugin-google-fonts`,
options: {
fonts: [`lato`, `source sans pro\:300,400,400i,700`],
display: "swap",
},
},
],
}