-
Notifications
You must be signed in to change notification settings - Fork 41
/
gatsby-config.ts
113 lines (105 loc) · 3.05 KB
/
gatsby-config.ts
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
import dotenv from 'dotenv';
dotenv.config({
path: `.env.${process.env.NODE_ENV}`,
});
const stripTrailingSlash = (str: string) => (str.endsWith('/') ? str.slice(0, -1) : str);
const mainWebsite = stripTrailingSlash(process.env.GATSBY_ABLY_MAIN_WEBSITE ?? 'http://localhost:3000');
// Set the provided asset prefix so we can fetch assets from elsewhere when specified
export const assetPrefix = process.env.ASSET_PREFIX;
// We're mounted under /docs in deployments
export const pathPrefix = '/docs';
export const trailingSlash = 'never';
export const siteMetadata = {
siteUrl: mainWebsite,
title: 'Documentation | Ably Realtime',
externalScriptsData: {
hubspotTrackingId: process.env.HUBSPOT_TRACKING_ID,
addsearchSiteKey: process.env.ADDSEARCH_SITE_KEY,
googleTagManagerAuthToken: process.env.GOOGLE_TAG_MANAGER_AUTH_TOKEN,
gtmPreview: process.env.GOOGLE_TAG_MANAGER_PREVIEW,
headwayAccountId: process.env.HEADWAY_ACCOUNT_ID,
boomerangEnabled: process.env.BOOMERANG_ENABLED,
announcementEnabled: process.env.ANNOUNCEMENT_ENABLED,
oneTrustDomain: process.env.ONE_TRUST_DOMAIN,
oneTrustEnabled: process.env.ONE_TRUST_ENABLED,
oneTrustTest: process.env.ONE_TRUST_TEST,
inkeepEnabled: process.env.INKEEP_CHAT_ENABLED,
inkeepApiKey: process.env.INKEEP_CHAT_API_KEY,
inkeepIntegrationId: process.env.INKEEP_CHAT_INTEGRATION_ID,
inkeepOrganizationId: process.env.INKEEP_CHAT_ORGANIZATION_ID,
},
};
export const graphqlTypegen = true;
export const plugins = [
'gatsby-plugin-postcss',
'gatsby-plugin-image',
'gatsby-plugin-sharp',
'gatsby-transformer-yaml',
'gatsby-transformer-sharp',
'gatsby-plugin-react-helmet',
{
resolve: 'gatsby-plugin-root-import',
options: {
HowTos: `${__dirname}/how-tos`,
},
},
'gatsby-plugin-mdx',
// Images
{
resolve: 'gatsby-source-filesystem',
options: {
name: 'images',
path: './src/images',
fastHash: true,
},
__key: 'images',
},
// Data
{
resolve: 'gatsby-source-filesystem',
options: {
name: 'textile-partials',
path: './content/partials',
},
__key: 'textile-partials',
},
{
resolve: 'gatsby-source-filesystem',
options: {
name: 'textile-nanoc-compatible',
path: './content',
},
__key: 'textile-nanoc-compatible',
},
{
resolve: 'gatsby-source-filesystem',
options: {
name: 'yaml-page-furniture',
path: './data/yaml/page-furniture',
},
__key: 'yaml-page-furniture',
},
{
resolve: 'gatsby-source-filesystem',
options: {
name: 'yaml-page-content',
path: './data/yaml/page-content',
},
__key: 'yaml-page-content',
},
{
resolve: 'gatsby-source-filesystem',
options: {
name: 'how-tos',
path: './how-tos',
},
},
{
resolve: `gatsby-plugin-sitemap`,
options: {
createLinkInHead: false,
},
},
'gatsby-transformer-remark',
`gatsby-plugin-client-side-redirect`, // Keep this last in the list; Source: https://www.gatsbyjs.com/plugins/gatsby-plugin-client-side-redirect/
];