-
Notifications
You must be signed in to change notification settings - Fork 393
/
gatsby-config.js
163 lines (153 loc) · 3.88 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
153
154
155
156
157
158
159
160
161
162
163
/* eslint-env node */
require('dotenv').config()
const path = require('path')
const apiMiddleware = require('@dvcorg/websites-server/src/middleware/api')
const redirectsMiddleware = require('@dvcorg/websites-server/src/middleware/redirects')
const title = 'Data Version Control · DVC'
const description =
'Open-source version control system for Data Science and Machine Learning ' +
'projects. Git-like experience to organize your data, models, and ' +
'experiments.'
const keywords = [
'data version control',
'machine learning',
'models management'
]
const plugins = [
'gatsby-plugin-twitter',
'landing-page',
{
resolve: '@dvcorg/gatsby-theme-iterative',
options: {
remark: false,
simpleLinkerTerms: require('./content/linked-terms'),
glossaryPath: path.resolve('content', 'basic-concepts')
}
},
{
resolve: 'gatsby-source-filesystem',
options: {
name: 'data',
path: path.join(__dirname, 'content', 'data')
}
},
{
resolve: 'gatsby-source-filesystem',
options: {
name: 'images',
path: path.join(__dirname, 'static', 'img')
}
},
'community-page',
{
resolve: 'gatsby-plugin-catch-links'
},
{
resolve: `gatsby-source-rss-feed`,
options: {
url: `https://iterative.ai/blog/rss.xml`,
name: `IterativeBlog`
}
},
{
resolve: 'gatsby-plugin-manifest',
options: {
/* eslint-disable @typescript-eslint/naming-convention */
background_color: '#eff4f8',
display: 'minimal-ui',
icon: 'static/favicon-512x512.png',
name: 'dvc.org',
short_name: 'dvc.org',
start_url: '/',
theme_color: '#eff4f8',
icons: [
{
src: '/apple-touch-icon-48x48.png',
sizes: '48x48',
type: 'image/png'
},
{
src: '/apple-touch-icon-72x72.png',
sizes: '72x72',
type: 'image/png'
},
{
src: '/apple-touch-icon-96x96.png',
sizes: '96x96',
type: 'image/png'
},
{
src: '/apple-touch-icon-144x144.png',
sizes: '144x144',
type: 'image/png'
},
{
src: '/apple-touch-icon.png',
sizes: '180x180',
type: 'image/png'
},
{
src: '/apple-touch-icon-192x192.png',
sizes: '192x192',
type: 'image/png'
},
{
src: '/apple-touch-icon-256x256.png',
sizes: '256x256',
type: 'image/png'
},
{
src: '/apple-touch-icon-384x384.png',
sizes: '384x384',
type: 'image/png'
},
{
src: '/apple-touch-icon-512x512.png',
sizes: '512x512',
type: 'image/png'
}
]
/* eslint-enable @typescript-eslint/naming-convention */
}
}
]
if (process.env.GATSBY_GTM_ID) {
plugins.push({
resolve: `gatsby-plugin-google-tagmanager`,
options: {
id: process.env.GATSBY_GTM_ID,
// Include GTM in development.
//
// Defaults to false meaning GTM will only be loaded in production.
includeInDevelopment: process.env.GTM_INCLUDE_IN_DEV === `true`,
// datalayer to be set before GTM is loaded
// should be an object or a function that is executed in the browser
//
// Defaults to null
defaultDataLayer: { platform: `gatsby` }
}
})
}
if (process.env.ANALYZE) {
plugins.push({
resolve: 'gatsby-plugin-webpack-bundle-analyser-v2'
})
}
module.exports = {
trailingSlash: 'never',
plugins,
siteMetadata: {
description,
author: 'Iterative',
keywords,
siteUrl: process.env.HEROKU_APP_NAME
? `https://${process.env.HEROKU_APP_NAME}.herokuapp.com/`
: 'https://dvc.org',
title
},
developMiddleware: app => {
app.use(redirectsMiddleware)
app.use('/api', apiMiddleware)
},
jsxRuntime: 'automatic'
}