-
Notifications
You must be signed in to change notification settings - Fork 8
/
docusaurus.config.js
268 lines (256 loc) · 7.09 KB
/
docusaurus.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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
const path = require('path');
/** @type {import('@docusaurus/types').DocusaurusConfig} */
var SITE_URL;
if (!process.env.CONTEXT || process.env.CONTEXT == 'production') {
SITE_URL = 'https://metriql.com';
} else {
SITE_URL = process.env.DEPLOY_URL;
}
var ALGOLIA_API_KEY;
if (!process.env.ALGOLIA_API_KEY) {
ALGOLIA_API_KEY = 'ca56d2ec2d55ebbf3e47dbb455ab5d08';
} else {
ALGOLIA_API_KEY = process.env.ALGOLIA_API_KEY;
}
var GIT_BRANCH;
if (!process.env.CONTEXT || process.env.CONTEXT == 'production') {
GIT_BRANCH = 'main';
} else {
GIT_BRANCH = process.env.HEAD;
}
var ALGOLIA_INDEX_NAME;
if (!process.env.ALGOLIA_INDEX_NAME) {
ALGOLIA_INDEX_NAME = 'metriql';
} else {
ALGOLIA_INDEX_NAME = process.env.ALGOLIA_INDEX_NAME;
}
var PRERELEASE = (process.env.PRERELEASE || false);
var WARNING_BANNER;
if (!PRERELEASE) {
WARNING_BANNER = {};
} else {
WARNING_BANNER = {
id: 'prerelease', // Any value that will identify this message.
content:
'CAUTION: Prerelease! This documentation reflects the next minor version of Metriql. <a href="https://metriql.com">View current docs</a>.',
backgroundColor: '#ffa376', // Defaults to `#fff`.
textColor: '#033744', // Defaults to `#000`.
}
}
module.exports = {
title: 'Metriql Docs',
tagline: 'Headless BI for all your company data',
url: SITE_URL,
baseUrl: '/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/favicon.ico',
organizationName: 'metriql',
projectName: 'metriql',
themeConfig: {
sidebarCollapsible: true,
image: '/img/logo/social.png',
announcementBar: WARNING_BANNER,
algolia: {
apiKey: ALGOLIA_API_KEY,
//debug: true,
indexName: ALGOLIA_INDEX_NAME,
algoliaOptions: {
},
},
prism: {
defaultLanguage: 'yml',
theme: (() => {
var theme = require('prism-react-renderer/themes/nightOwl');
// Add additional rule to nightowl theme in order to change
// the color of YAML keys (to be different than values).
// There weren't many Prism themes that differentiated
// YAML keys and values. See link:
// https://github.com/FormidableLabs/prism-react-renderer/tree/master/src/themes
theme.styles.push({
types: ["atrule"],
style: {
// color chosen from the nightowl theme palette
// https://github.com/FormidableLabs/prism-react-renderer/blob/master/src/themes/nightOwl.js#L83
color: "rgb(255, 203, 139)"
}
});
return theme
})(),
additionalLanguages: ['bash'],
},
navbar: {
logo: {
src: '/img/logo.svg',
alt: 'ΣQL',
},
items: [
{
to: '/introduction/intro',
label: 'Docs',
position: 'left',
activeBasePath: 'introduction',
},
{
to: '/reference/dataset',
label: 'Reference',
position: 'left',
activeBasePath: 'reference'
},
{
to: '/metriql-cli/cli-overview',
label: 'Metriql CLI',
position: 'left',
activeBasePath: 'metriql-cli'
},
{
to: '/query/introduction',
label: 'Querying',
position: 'left',
activeBasePath: 'query/introduction'
},
{
label: 'Integrations',
position: 'left',
items: [
{
to: '/integrations/rest-api',
label: 'REST API',
activeBasePath: 'integrations/rest-api'
},
{
to: '/integrations/bi-tools/index',
label: 'BI Tools / Data Applications',
activeBasePath: 'integrations/bi-tools/index',
items: [
{
to: '/integrations/bi-tools/google-data-studio',
label: 'Data Studio',
activeBasePath: 'integrations/bi-tools/google-data-studio'
}
]
},
{
to: '/integrations/embedded',
label: 'Embedded analytics',
activeBasePath: 'integrations/embedded'
},
{
to: '/integrations/build',
label: 'Build +',
activeBasePath: 'integrations/build'
},
],
},
{
label: 'Learn',
position: 'right',
items: [
{
label: 'Getting Started Tutorial',
to: '/tutorial/for-starters',
},
{
to: '/faq',
label: 'FAQs',
},
{
label: 'Youtube',
href: 'https://www.youtube.com/channel/UCm8bxKrtZyggJ8W9TVaNoPw',
},
{
to: '/blog',
label: 'Blog',
}
],
},
{
label: 'Community',
position: 'right',
items: [
{
label: 'Metriql Slack',
href: 'https://join.slack.com/t/metriql/shared_invite/zt-tz1nzvyd-ker8LGcBQmzrwvfAkFO1qQ',
},
{
label: 'GitHub',
href: 'https://github.com/metriql/metriql',
},
]
},
],
},
footer: {
// logo: {
// alt: 'Rakam Logo',
// src: 'img/oss_logo.png',
// href: 'https://rakam.io',
// },
copyright: `By <a href="https://liveramp.com" target="_blank">LiveRamp</a><br><a href="/privacypolicy">Privacy Policy</a> · <a href="/termsofuse">Terms of Usage</a>`,
},
},
presets: [
[
'@docusaurus/preset-classic',
{
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
docs: {
path: 'docs',
routeBasePath: '/',
sidebarPath: require.resolve('./sidebars.js'),
editUrl: 'https://github.com/metriql/metriql.com/edit/' + GIT_BRANCH + '/',
showLastUpdateTime: false,
//showLastUpdateAuthor: false,
},
blog: {
blogTitle: 'Metriql Blog',
blogDescription: 'Blog posts about Metriql',
blogSidebarCount: 0
},
},
]
],
plugins: [
path.resolve('plugins/svg'),
[
'@docusaurus/plugin-pwa',
{
debug: false,
offlineModeActivationStrategies: [
'appInstalled',
'standalone',
'queryString',
],
pwaHead: [
{
tagName: 'link',
rel: 'icon',
href: '/img/logo/logo-72.png',
},
{
tagName: 'link',
rel: 'manifest',
href: '/manifest.json',
},
{
tagName: 'meta',
name: 'theme-color',
content: '#1890ff',
},
],
},
],
],
scripts: [
'https://code.jquery.com/jquery-3.4.1.min.js',
'https://unpkg.com/rapidoc/dist/rapidoc-min.js'
],
stylesheets: [
'/css/search.css',
'/css/api.css',
'/css/custom.css',
'https://fonts.googleapis.com/css2?family=Inter:wght@500&display=swap'
]
};