-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocusaurus.config.ts
More file actions
264 lines (253 loc) · 7.15 KB
/
docusaurus.config.ts
File metadata and controls
264 lines (253 loc) · 7.15 KB
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
import { themes as prismThemes } from "prism-react-renderer";
import type { Config } from "@docusaurus/types";
import type * as Preset from "@docusaurus/preset-classic";
// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
const config: Config = {
title: "OnceHub Developer Center",
tagline: "Build powerful scheduling integrations with OnceHub APIs",
favicon: "img/favicon.png",
// Future flags, see https://docusaurus.io/docs/api/docusaurus-config#future
future: {
v4: true, // Improve compatibility with the upcoming Docusaurus v4
},
// Set the production url of your site here
// Use environment variable to determine deployment target
url: process.env.DOCUSAURUS_URL || "https://developers.oncehub.com", // Default to production
// Set the /<baseUrl>/ pathname under which your site is served
// For Azure Static Web Apps, use root path
baseUrl: "/", // Root path for Azure Static Web App
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: "scheduleonce", // GitHub org/user
projectName: "developer-center", // Repo name
deploymentBranch: "gh-pages",
onBrokenLinks: "throw",
markdown: {
hooks: {
onBrokenMarkdownLinks: "warn",
},
},
// Even if you don't use internationalization, you can use this field to set
// useful metadata like html lang. For example, if your site is Chinese, you
// may want to replace "en" with "zh-Hans".
i18n: {
defaultLocale: "en",
locales: ["en"],
},
trailingSlash: true,
presets: [
[
"classic",
{
docs: {
// Single docs plugin with multiple sidebars for product separation
path: "docs",
routeBasePath: "docs",
sidebarPath: "./sidebars.ts",
editUrl:
"https://github.com/scheduleonce/developer-center/tree/main/",
},
theme: {
customCss: "./src/css/custom.css",
},
googleTagManager: {
containerId:
process.env.DOCUSAURUS_URL === "https://developers.oncehub.com"
? "GTM-WJ6GSHH"
: "GTM-PL2LFVW2",
},
} satisfies Preset.Options,
],
],
plugins: [
// Load Scalar standalone script once globally
"./src/plugins/scalarScriptPlugin.js",
// Product Badge Enhancement Plugin
"./src/plugins/productBadgePlugin.js",
// Booking Calendars API Reference
[
"@scalar/docusaurus",
{
id: "booking-calendars-api",
label: "Booking Calendars API Reference",
route: "/reference/booking-calendars",
showNavLink: false,
cdn: "",
configuration: {
url: "/booking-calendars-api.yaml",
metaData: {
title: "Booking Calendars API Reference | OnceHub Developer Center",
},
documentDownloadType: "original",
hideDarkModeToggle: true,
hideModels: true,
theme: "alternate",
},
},
],
// Booking Pages API Reference (Classic)
[
"@scalar/docusaurus",
{
id: "booking-pages-api",
label: "Booking Pages API Reference",
route: "/reference/booking-pages",
showNavLink: false,
cdn: "",
configuration: {
url: "/booking-pages-api.yaml",
metaData: {
title: "Booking Pages API Reference | OnceHub Developer Center",
},
documentDownloadType: "original",
hideDarkModeToggle: true,
hideModels: true,
theme: "alternate",
},
},
],
// OnceHub v1 API Reference (Deprecated)
[
"@scalar/docusaurus",
{
id: "oncehub-v1-api",
label: "OnceHub v1 API Reference (Deprecated)",
route: "/reference/oncehub-v1",
showNavLink: false,
cdn: "",
configuration: {
url: "/oncehub-v1.yaml",
metaData: {
title:
"OnceHub v1 API Reference (Deprecated) | OnceHub Developer Center",
},
documentDownloadType: "original",
hideDarkModeToggle: true,
hideModels: true,
theme: "alternate",
},
},
],
[
"@signalwire/docusaurus-plugin-llms-txt",
{
ui: {
copyPageContent: {
buttonLabel: "Copy Page",
display: {
docs: true,
},
},
},
},
],
],
themes: ["@signalwire/docusaurus-theme-llms-txt"],
themeConfig: {
// Replace with your project's social card
image: "/img/oncehub-social-card.png",
algolia: {
appId: "BLX1JTJWWV",
apiKey: "42069158effaf087c1a7669a3a640f40",
indexName: "OnceHub Developer Center",
contextualSearch: true,
searchParameters: {},
searchPagePath: "search",
},
navbar: {
title: "",
logo: {
alt: "OnceHub Developer Center",
src: "/img/logo-light.png",
srcDark: "/img/logo-dark.png",
href: "/",
target: "_self",
height: 27,
},
items: [
{
type: "docSidebar",
sidebarId: "tutorialSidebar",
label: "Documentation",
position: "left",
},
{
type: "dropdown",
label: "API Reference",
position: "left",
items: [
{
to: "/reference/booking-calendars/",
label: "Booking Calendars",
},
{
to: "/reference/booking-pages/",
label: "Booking Pages (Classic)",
},
{
to: "/docs/client-side-api/introduction/",
label: "Client Side APIs",
},
],
},
{
href: "https://help.oncehub.com",
label: "Help Center",
position: "right",
},
{
href: "https://www.youtube.com/playlist?list=PLbDqoI6OzOkkaEHwtL-GcZZl573tDbtMc",
label: "Tutorials",
position: "right",
},
{
href: "https://www.oncehub.com/",
label: "Website",
position: "right",
},
],
},
footer: {
style: "dark",
links: [
{
title: "Docs",
items: [
{
label: "OnceHub v1 (Deprecated)",
to: "/reference/oncehub-v1/",
},
],
},
{
title: "Legal & Help",
items: [
{
label: "Trust Center",
href: "https://www.oncehub.com/trustcenter",
},
{
label: "API Terms of Service",
href: "https://www.oncehub.com/trustcenter/legal/api-terms-of-use",
},
],
},
{
title: "Support",
items: [
{
label: "Live Chat",
href: "https://www.oncehub.com/live-chat-support",
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} OnceHub.`,
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
},
} satisfies Preset.ThemeConfig,
};
export default config;