forked from newrelic/instant-observability-website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gatsby-config.js
152 lines (150 loc) · 4.74 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
const quote = (str) => `"${str}"`;
const resolveQuickstartSlug = require('./src/utils/resolveQuickstartSlug');
module.exports = {
pathPrefix: `/instant-observability`,
trailingSlash: 'never',
graphqlTypegen: true,
flags: {
DEV_SSR: true,
PRESERVE_WEBPACK_CACHE: true,
PRESERVE_FILE_DOWNLOAD_CACHE: true,
},
siteMetadata: {
title: 'New Relic Instant Observability',
titleTemplate: '%s | New Relic Instant Observability',
description:
'Instant Observability - Dashboards, alerts, and integrations all in one place! Our quickstarts bundle everything you need to start monitoring like a pro right out of the box.',
author: 'New Relic',
repository: 'https://github.com/newrelic/instant-observability-website',
siteUrl: 'https://newrelic.com/instant-observability',
branch: 'main',
},
plugins: [
'gatsby-plugin-image',
'gatsby-plugin-sharp',
'gatsby-transformer-sharp',
{
resolve: '@newrelic/gatsby-theme-newrelic',
options: {
layout: {
contentPadding: '2rem',
maxWidth: '1700px',
component: require.resolve('./src/layouts'),
mobileBreakpoint: '760px',
},
prism: {
languages: ['yaml', 'sass', 'scss', 'java'],
},
relatedResources: {
swiftype: {
resultsPath: `${__dirname}/src/data/related-pages.json`,
refetch: Boolean(process.env.BUILD_RELATED_CONTENT),
engineKey: 'Ad9HfGjDw4GRkcmJjUut',
limit: 5,
getSlug: ({ node }) => {
if (node.internal.type === 'Quickstarts') {
return resolveQuickstartSlug(node.name);
}
},
getParams: ({ node }) => {
const tags = node.keywords;
const title = node.title;
return {
q: tags ? tags.map(quote).join(' OR ') : title,
search_fields: {
page: [
'tags^10',
'quick_start_name^8',
'body^5',
'title^1.5',
'*',
],
},
filters: {
page: {
type: ['docs', 'developer', 'opensource', 'quickstarts'],
document_type: [
'!views_page_menu',
'!term_page_api_menu',
'!term_page_landing_page',
],
},
},
};
},
filter: ({ node }) => node.internal.type === 'Quickstarts',
},
},
newrelic: {
configs: {
production: {
instrumentationType: 'proAndSPA',
accountId: '10956800',
trustKey: '1',
agentID: '35095127',
licenseKey: 'NRJS-649173eb1a7b28cd6ab',
applicationID: '35095127',
beacon: 'staging-bam-cell.nr-data.net',
errorBeacon: 'staging-bam-cell.nr-data.net',
},
development: {
instrumentationType: 'proAndSPA',
accountId: '10956800',
trustKey: '1',
agentID: '35095128',
licenseKey: 'NRJS-649173eb1a7b28cd6ab',
applicationID: '35095128',
beacon: 'staging-bam-cell.nr-data.net',
errorBeacon: 'staging-bam-cell.nr-data.net',
},
},
},
tessen: {
tessenVersion: '1.14.0',
product: 'IO',
subproduct: 'TIO',
segmentWriteKey: 'Ako0hclX8WGHwl9rm4n5uxLtT4wgEtuU',
trackPageViews: true,
pageView: {
eventName: 'pageView',
category: 'DocPageView',
getProperties: ({ location, env }) => ({
path: location.pathname,
env: env === 'production' ? 'prod' : env,
}),
},
},
newRelicRequestingServicesHeader: 'io-website',
},
},
{
resolve: 'gatsby-plugin-sass',
options: {
implementation: require('sass'),
},
},
{
resolve: 'gatsby-plugin-manifest',
options: {
name: 'New Relic Instant Observability',
short_name: 'IO',
start_url: '/',
background_color: '#1d252c',
theme_color: '#1d252c',
display: 'minimal-ui',
icon: 'src/images/favicon.png',
},
},
'gatsby-source-quickstarts',
'gatsby-plugin-mdx', // Not used, but required by the theme
'gatsby-plugin-use-query-params',
{
resolve: 'gatsby-plugin-gatsby-cloud',
options: {
headers: {
'/*': ['Referrer-Policy: no-referrer-when-downgrade'],
},
},
},
],
};