-
Notifications
You must be signed in to change notification settings - Fork 11
/
docusaurus.config.js
231 lines (224 loc) · 6.3 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
module.exports = {
title: "Golioth",
tagline: "The Device You're Developing Is Cloud Ready",
url: "https://docs.golioth.io",
themes: ["@docusaurus/theme-live-codeblock"],
baseUrl: "/",
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "throw",
favicon: "img/favicon.ico",
organizationName: "golioth", // Usually your GitHub org/user name.
projectName: "docs", // Usually your repo name.
themeConfig: {
colorMode: {
defaultMode: "dark",
respectPrefersColorScheme: false,
},
navbar: {
title: "Golioth",
logo: {
alt: "Golioth",
src: "img/coral-logo.png",
},
items: [
{
to: "getting-started",
activeBasePath: "getting-started",
label: "Getting Started",
position: "left",
},
{
to: "firmware",
activeBasePath: "firmware",
label: "Firmware",
position: "left",
},
{
to: "device-management",
activeBasePath: "device-management",
label: "Device Management",
position: "left",
},
{
to: "data-routing",
activeBasePath: "data-routing",
label: "Data Routing",
position: "left",
},
{
to: "application-services",
activeBasePath: "application-services",
label: "Application Services",
position: "left",
},
{
to: "reference",
activeBasePath: "reference",
label: "Reference",
position: "left",
},
{
href: "https://github.com/golioth",
label: "GitHub",
position: "right",
},
{
href: "https://console.golioth.io",
label: "Console",
position: "right",
},
],
},
footer: {
links: [
{
title: "Docs",
items: [
{
label: "Getting Started",
to: "/getting-started",
},
{
label: "Over the Air Updates",
to: "/device-management/ota",
},
],
},
{
title: "Reference",
items: [
{
label: "API and SDK Reference",
to: "/reference",
},
{
label: "API Docs",
to: "/reference/management-api/",
},
{
label: "goliothctl",
to: "/reference/command-line-tools/goliothctl/goliothctl/",
},
{
label: "coap",
to: "/reference/command-line-tools/coap/coap/",
},
],
},
{
title: "More",
items: [
{
label: "Ask a Question: Golioth Forum",
href: "https://forum.golioth.io",
},
{
label: "GitHub",
href: "https://github.com/golioth",
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} Golioth. Built with ❤️ & Docusaurus.`,
},
algolia: {
// The application ID provided by Algolia
appId: "42Q13YI9MY",
// Public API key: it is safe to commit it
apiKey: "174525da827993e07fc87b28736000f1",
indexName: "golioth",
// Optional: see doc section below
contextualSearch: true,
// Optional: Specify domains where the navigation should occur through
// window.location instead on history.push. Useful when our Algolia
// config crawls multiple documentation sites and we want to
// navigate with window.location.href to them. externalUrlRegex
//'external\\.com|domain\\.com',
// Optional: Algolia search parameters
searchParameters: {},
// Optional: path for search page that enabled by default (`false` to disable it)
searchPagePath: "search",
//... other Algolia params
},
zoom: {
selector: '.markdown :not(em) > img',
config: {
// options you can specify via https://github.com/francoischalifour/medium-zoom#usage
background: {
light: 'rgb(255, 255, 255)',
dark: 'rgb(50, 50, 50)'
}
}
},
prism: {
additionalLanguages: ['json'],
},
},
presets: [
[
"@docusaurus/preset-classic",
{
docs: {
routeBasePath: "/",
sidebarPath: require.resolve("./sidebars.js"),
// editUrl: 'https://github.com/golioth/golioth/edit/master/docs/',
admonitions: {
keywords: ['golioth', 'usage'],
extendDefaults: true,
},
},
gtag: {
trackingID: "G-C2MSLQD9D7",
anonymizeIP: true,
},
blog: false,
pages: false,
theme: {
customCss: [
require.resolve("swagger-ui-react/swagger-ui.css"),
require.resolve("./src/css/custom.css"),
require.resolve("./src/css/custom-swagger-ui.css"),
],
},
},
],
],
plugins: [
[
"docusaurus2-dotenv",
{
path: `./.env.${process.env.HOSTING_ENV}`, // The path to your environment variables.
safe: false, // If false ignore safe-mode, if true load './.env.example', if a string load that file as the sample
systemvars: false, // Set to true if you would rather load all system variables as well (useful for CI purposes)
silent: false, // If true, all warnings will be suppressed
expand: false, // Allows your variables to be "expanded" for reusability within your .env file
defaults: false, // Adds support for dotenv-defaults. If set to true, uses ./.env.defaults
},
],
[
"posthog-docusaurus",
{
apiKey: `${process.env.POSTHOG_API_KEY}`,
appUrl: "https://app.posthog.com",
},
],
"docusaurus-plugin-image-zoom",
[
"@docusaurus/plugin-google-tag-manager",
{
containerId: "GTM-W6QN7FC",
},
],
// [
// '@docusaurus/plugin-client-redirects',
// {
// redirects: [
// {
// to: '/docs/', // string
// from: ['/docs/oldDocPathFrom2019', '/docs/legacyDocPathFrom2016'], // string | string[]
// },
// ],
// },
// ],
],
};