This repository was archived by the owner on Jan 30, 2025. It is now read-only.
forked from rbroek/objectiv.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocusaurus.config.js
204 lines (194 loc) · 5.67 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
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
const path = require('path');
const objectivEnvironment = process.env.OBJECTIV_ENVIRONMENT ?? 'development';
const getEnvConfig = require('./env_config.js');
const envConfig = getEnvConfig(objectivEnvironment);
const slackJoinLink = '/join-slack';
/** @type {import('@docusaurus/types').Config} */
const config = {
title: "Objectiv - Powerful product analytics for data teams",
tagline: 'Run open-source product analytics from your notebook, with full control over data and models.', //meta description, and og:description
titleDelimiter: '|',
baseUrl: envConfig.baseUrl,
baseUrlIssueBanner: false, // if enabled, the cookie banner is moved into this banner, which always hides it
url: envConfig.websiteUrl,
favicon: 'img/favicon/favicon.ico',
organizationName: 'objectiv', // Usually your GitHub org/user name.
projectName: 'objectiv.io', // Usually your repo name.
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'throw',
// undefined it the default behaviour of docusaurus, and leaves it alone
// see: https://docusaurus.io/docs/api/docusaurus-config#trailing-slash for more info
trailingSlash: undefined,
presets: [
[
'@docusaurus/preset-classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
docs: false,
blog: {
blogTitle: 'Objectiv Blog',
blogDescription: 'Objectiv Blog',
blogSidebarTitle: 'All posts',
blogSidebarCount: 0,
postsPerPage: 10,
showReadingTime: false,
feedOptions: {
type: 'all',
title: 'Objectiv Blog',
description: 'Objectiv Blog',
copyright: `Copyright © ${new Date().getFullYear()} Objectiv.`,
},
},
sitemap: {
changefreq: 'weekly',
priority: 0.5,
},
}),
],
],
plugins: [
path.resolve(__dirname, 'src/plugins/favicons/'),
[
// only load the post-build plugin when creating a production, staging, or testing build
path.resolve(__dirname, 'src/plugins/post-build/'),
{
skip: objectivEnvironment !== 'production'
&& objectivEnvironment !== 'staging'
&& objectivEnvironment !== 'testing',
environment: objectivEnvironment
}
]
],
customFields: {
trackerApplicationId: envConfig.trackerApplicationId,
trackerEndPoint: envConfig.trackerEndPoint,
trackerConsoleEnabled: envConfig.trackerConsoleEnabled === 'true',
slackJoinLink: slackJoinLink,
gitHubRepo: "objectiv-analytics"
},
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
metadata: [{
property: 'og:image', content: 'https://objectiv.io/img/open-graph/objectiv-og-large.png'
},
{
property: 'robots', content: 'all'
}
],
colorMode: {
disableSwitch: true,
},
navbar: {
title: '',
hideOnScroll: false,
logo: {
alt: 'Objectiv Logo',
src: 'img/logo-objectiv.svg',
},
items: [
{
to: 'self-hosted',
label: 'Self-hosted',
},
{
to: 'cloud',
label: 'Cloud',
},
{
to: 'blog',
label: 'Blog',
},
{
to: 'about',
label: 'About',
},
{
label: 'Docs',
to: envConfig.websiteUrl + '/docs', // ensure Docusaurus redirects to standalone docs
target: '_self',
objectiv: {
waitUntilTracked: true
}
},
{
href: 'https://github.com/objectiv/objectiv-analytics',
label: 'GitHub',
position: 'right',
className: 'navItem navGitHub',
target: '_self',
objectiv: {
waitUntilTracked: true
}
},
{
href: slackJoinLink,
label: 'Slack',
position: 'right',
className: 'navItem navSlack',
target: '_self',
objectiv: {
waitUntilTracked: true
}
},
{
href: 'https://twitter.com/objectiv_io',
label: 'Twitter',
position: 'right',
className: 'navItem navTwitter',
target: '_self',
objectiv: {
waitUntilTracked: true
}
},
{
href: 'mailto:[email protected]',
label: 'Contact Us',
position: 'right',
className: 'navItem navEmail',
target: '_self',
objectiv: {
waitUntilTracked: true
}
},
],
},
footer: {
style: 'light',
copyright: `Copyright © ${new Date().getFullYear()} Objectiv`,
links: [
{
items: [
{
label: 'Privacy Policy',
to: 'privacy/',
},
{
label: 'Cookies',
to: 'privacy/cookies',
},
],
},
],
},
zoom: {
config: {
background: {
light: 'rgb(255, 255, 255)',
dark: 'rgb(50, 50, 50)'
}
}
}
})
};
module.exports = config;
console.log("OBJECTIV TRACKER APPLICATION ID:", config.customFields.trackerApplicationId);
console.log("OBJECTIV TRACKER ENDPOINT:", config.customFields.trackerEndPoint);
console.log("OBJECTIV TRACKER CONSOLE ENABLED:", config.customFields.trackerConsoleEnabled);
console.log("DOCUSAURUS URL:", config.baseUrl);
console.log("DOCUSAURUS BASEURL:", config.baseUrl);