-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgatsby-config.js
115 lines (109 loc) · 3.51 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
require('dotenv').config();
const path = require('path');
const { PATH_PREFIX = '/' } = process.env;
module.exports = {
pathPrefix: PATH_PREFIX,
siteMetadata: {
title: 'IBM Front-end Development',
titleInternal: 'FED@IBM',
},
plugins: [
{
resolve: `gatsby-plugin-google-analytics`,
options: {
trackingId: '',
},
},
`gatsby-plugin-sharp`,
`gatsby-transformer-sharp`,
{
resolve: `gatsby-plugin-manifest`,
options: {
name: `IBM Front-end Development`,
short_name: `FED`,
start_url: `/`,
background_color: `#000000`,
theme_color: `#9deeb2`,
display: `minimal-ui`,
icon: `src/content/global/images/favicon-32.png`, // This path is relative to the root of the site.
},
},
'gatsby-plugin-offline',
{
resolve: 'gatsby-source-filesystem',
options: {
name: 'content',
path: `${__dirname}/src/content/`,
},
},
{
resolve: `gatsby-transformer-remark`,
options: {
plugins: [
`gatsby-plugin-catch-links`,
`gatsby-remark-smartypants`,
`gatsby-remark-component`,
{
resolve: 'gatsby-remark-embed-video',
options: {
width: 1024,
ratio: 1.77, // Optional: Defaults to 16/9 = 1.77 // height: 333, 1584Optional: Overrides optional.ratio
related: false, //Optional: Will remove related videos from the end of an embedded YouTube video.
noIframeBorder: true, //Optional: Disable insertion of <style> border: 0
},
},
`gatsby-remark-responsive-iframe`,
`gatsby-remark-unwrap-images`,
`gatsby-remark-relative-images`,
{
resolve: `gatsby-remark-images`,
options: {
// It's important to specify the maxWidth (in pixels) of
// the content container as this plugin uses this as the
// base for generating different widths of each image.
maxWidth: 1120,
linkImagesToOriginal: false,
backgroundColor: 'transparent',
},
},
'gatsby-remark-copy-linked-files',
{
resolve: 'gatsby-remark-embedded-codesandbox',
options: {
directory: `${__dirname}/src/content`,
// Optional:
// Custom protocol for parsing the embedding link
// default:
protocol: 'embedded-codesandbox://',
// Customise Codesandbox embedding options:
// https://codesandbox.io/docs/embedding#embed-options
// default:
embedOptions: {
view: 'preview',
hidenavigation: 1,
},
// Customise the embedding iframe given the generated url
// default:
getIframe: url =>
`<iframe src="${url}" class="embedded-codesandbox" sandbox="allow-modals allow-forms allow-popups allow-scripts allow-same-origin"></iframe>`,
},
},
],
},
},
'gatsby-plugin-react-helmet',
{
resolve: 'gatsby-plugin-sass',
options: {
includePaths: [path.resolve(__dirname, 'node_modules')],
importer: (url, prev, done) => {
done({
file: !/import-once(\.scss)?$/.test(url)
? url
: path.resolve(__dirname, 'src/styles/import-once'),
});
},
},
},
],
};