-
Notifications
You must be signed in to change notification settings - Fork 90
/
gatsby-config.js
142 lines (140 loc) · 4.86 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
const path = require(`path`);
const _ = require('lodash');
const remarkExternalLinks = require('./plugins/remark-external-link-icon');
module.exports = {
flags: {
DEV_SSR: true,
PRESERVE_WEBPACK_CACHE: true,
PRESERVE_FILE_DOWNLOAD_CACHE: true,
},
siteMetadata: {
title: `New Relic Open Source`,
description: `New Relic's open source website makes it easy for you to explore the projects we're maintaining as well as our involvement in open standards.`,
author: `@newrelic`,
repository: 'https://github.com/newrelic/opensource-website',
siteUrl: 'https://opensource.newrelic.com',
branch: 'develop',
},
plugins: [
{
resolve: '@newrelic/gatsby-theme-newrelic',
options: {
layout: {
maxWidth: '1236px',
contentPadding: '28px',
mobileBreakpoint: '760px',
},
/*
;NREUM.loader_config={accountID:"10175106",trustKey:"1",agentID:"21547964",licenseKey:"23448da482",applicationID:"21547964"}
;NREUM.info={beacon:"staging-bam.nr-data.net",errorBeacon:"staging-bam.nr-data.net",licenseKey:"23448da482",applicationID:"21547964",sa:1}
*/
newrelic: {
config: {
instrumentationType: 'proAndSPA',
accountId: '10956800',
trustKey: '1',
agentID: '30713728',
licenseKey: 'NRJS-649173eb1a7b28cd6ab',
applicationID: '30713728',
beacon: 'staging-bam-cell.nr-data.net',
errorBeacon: 'staging-bam-cell.nr-data.net',
},
},
segment: {
segmentWriteKey: 'noviNOFjASOSPcSEAkwoRxOt0Y1719KD',
section: 'opensource',
platform: 'opensource_pages',
},
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `data`,
path: `${__dirname}/src/data`,
ignore: [`**/.*`], // ignore files starting with a dot
},
},
{
resolve: `gatsby-transformer-json`,
options: {
// Override the default behavior that adds `Json` to the end of data types
// Found here - https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-transformer-json/src/gatsby-node.js#L8-L20
typeName: ({ node, object, isArray }) => {
// eslint-disable-next-line no-unused-vars
const getType = function ({ node, object, isArray }) {
if (node.internal.type !== `File`) {
return _.upperFirst(_.camelCase(`${node.internal.type}`));
} else if (isArray) {
return _.upperFirst(_.camelCase(`${node.name}`));
} else {
return _.upperFirst(_.camelCase(`${path.basename(node.dir)}`));
}
};
const typeName = getType({ node, object, isArray });
return typeName;
},
},
},
{
resolve: `gatsby-plugin-manifest`,
options: {
name: `New Relic Open source`,
short_name: `NR OSS`,
start_url: `/`,
background_color: `#007e8a`,
theme_color: `#007e8a`,
display: `minimal-ui`,
icon: `src/images/favicon.png`, // This path is relative to the root of the site.
},
},
{
resolve: `gatsby-plugin-sass`,
options: {
implementation: require('sass'),
},
},
{
resolve: `gatsby-plugin-mdx`,
options: {
remarkPlugins: [remarkExternalLinks],
// https://www.gatsbyjs.org/packages/gatsby-plugin-mdx/#remark-plugins
gatsbyRemarkPlugins: [
{
resolve: `gatsby-remark-copy-linked-files`,
options: {
// `ignoreFileExtensions` defaults to [`png`, `jpg`, `jpeg`, `bmp`, `tiff`]
// as we assume you'll use gatsby-remark-images to handle
// images in markdown as it automatically creates responsive
// versions of images.
//
// If you'd like to not use gatsby-remark-images and just copy your
// original images to the public directory, set
// `ignoreFileExtensions` to an empty array.
// ignoreFileExtensions: []
ignoreFileExtensions: [`png`, `jpg`, `jpeg`, `bmp`, `tiff`],
},
},
{
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: 590,
},
},
],
// remarkPlugins: [require(`gatsby-remark-copy-linked-files`)],
extensions: [`.mdx`, `.md`],
},
},
'gatsby-plugin-netlify',
{
resolve: 'gatsby-plugin-gatsby-cloud',
options: {
allPageHeaders: ['Referrer-Policy: no-referrer-when-downgrade'],
},
},
],
};