-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocusaurus.config.js
397 lines (374 loc) · 12.1 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
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
// docusaurus.config.js
// @ts-check
// `@type` JSDoc annotations allow editor autocompletion and type checking
// (when paired with `@ts-check`).
// There are various equivalent ways to declare your Docusaurus config.
// See: https://docusaurus.io/docs/api/docusaurus-config
import { themes as prismThemes } from "prism-react-renderer";
/** @type {import('@docusaurus/types').Config} */
const config = {
title: "Adapty",
tagline: "Learn how to start with Adapty and get maximum out of your app",
favicon: "img/favicon_black.svg",
// Set the production url of your site here
url: "https://adapty.io",
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: "/docs/",
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: "adapty", // Usually your GitHub org/user name.
projectName: "adapty-docs", // Usually your repo name.
onBrokenLinks: "warn",
onBrokenMarkdownLinks: "ignore",
// 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"],
},
presets: [
[
"classic",
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: require.resolve("./sidebars.js"),
path: "docs",
routeBasePath: "/",
lastVersion: '3.0',
versions: {
"3.0" : {
label: "3.0",
path: "/",
banner: "none",
},
/*"2.0": {
banner: "none",
path: "2.0",
},*/
},
includeCurrentVersion: false,
},
blog: {
showReadingTime: false,
},
gtag: {
trackingID: "G-0M1BCR2275", // Replace with your Google Analytics Measurement ID
anonymizeIP: true, // Optional, anonymize IP addresses
},
theme: {
customCss: require.resolve("./src/css/custom.css"),
},
}),
],
],
/*plugins: [
[
'@docusaurus/plugin-client-redirects',
{
redirects: [
{
to: '/generate-in-app-purchase-key',
from: '/in-app-purchase-api-storekit-2',
},
{
to: '/enable-app-store-server-notifications',
from: '/app-store-server-notifications',
},
{
to: '/offers',
from: '/app-store-promotional-offers',
},
{
to: '/app-store-connection-configuration#step-4-enter-app-store-shared-secret',
from: '/app-store-shared-secret',
},
],
},
],
],*/
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
// Replace with your project's social card
image: "img/opengraph_adapty.png",
metadata: [{ name: 'twitter:card', content: 'summary_large_image' }],
navbar: {
title: "",
logo: {
alt: "Adapty Docs",
src: "img/Logo_black.svg",
href: "https://adapty.io",
},
items: [
/*{
type: "localeDropdown",
position: "right",
class: "navbar__link navbar__locale-link",
},*/
{
type: "docSidebar",
sidebarId: "tutorialSidebar",
position: "left",
label: "Documentation",
},
/*{
label: "SDK Reference",
position: "left",
items: [
{
label: "iOS",
href: "https://swift.adapty.io/documentation/adapty/",
},
{
label: "Android",
href: "https://kotlin.adapty.io/",
},
{
label: "Flutter",
href: "https://pub.dev/documentation/adapty_flutter/latest/adapty_flutter/adapty_flutter-library.html",
},
{
label: "React Native",
href: "https://react-native.adapty.io/classes/adapty",
},
],
},*/
{
label: "Server API",
position: "left",
href: "/getting-started-with-server-side-api",
},
{
label: "Support Forum",
position: "left",
href: "https://ask.adapty.io/questions",
},
/*{
type: "docsVersionDropdown",
position: "right",
dropdownActiveClassDisabled: true,
},*/
{
href: "https://app.adapty.io/login",
label: "Sign In",
position: "right",
class: "navbar__item navbar__link navbar__link--sign-in",
},
{
href: "https://app.adapty.io/registration",
label: "Sign Up for Free",
position: "right",
class: "navbar__item navbar__link navbar__link--sign-up",
},
// {
// href: "https://docs.adapty.io/discuss",
// label: "Share feedback",
// position: "right",
// class: "navbar__item navbar__link navbar__link--feedback",
// },
],
},
footer: {
style: "dark",
links: [
{
title: null,
items: [
{
html: `
<div class="footer__header">
<a href="https://adapty.io" target="_blank" rel="noopener noreferrer" class="footer__logo-icon">
<img src="/docs/img/Logo_white.svg" alt="Adapty Docs" class="footer__logo-svg">
</a>
<div class="footer__social">
<a href="https://twitter.com/AdaptyTeam" target="_blank" rel="noopener noreferrer" class="footer__social-icon">
<img class="footer__social-svg" src="/docs/img/logo_Twitter_white.svg" alt="Twitter">
</a>
<a href="https://www.linkedin.com/company/adaptyio" target="_blank" rel="noopener noreferrer" class="footer__social-icon">
<img class="footer__social-svg" src="/docs/img/logo_In_white.svg" alt="LinkedIn">
</a>
<a href="https://github.com/adaptyteam" target="_blank" rel="noopener noreferrer" class="footer__social-icon">
<img class="footer__social-svg" src="/docs/img/logo_github_white.svg" alt="GitHub">
</a>
<a href="https://www.youtube.com/@SubhubEn" target="_blank" rel="noopener noreferrer" class="footer__social-icon">
<img class="footer__social-svg" src="/docs/img/logo_youtube_white.svg" alt="YouTube">
</a>
</div>
</div>
`,
},
],
},
{
title: "Adapty UI Sample Apps ",
items: [
{
label: "iOS",
href: "https://github.com/adaptyteam/AdaptyUI-iOS",
},
{
label: "Android",
href: "https://github.com/adaptyteam/AdaptyUI-Android",
},
{
label: "Flutter",
href: "https://github.com/adaptyteam/AdaptyUI-Flutter",
},
{
label: "React Native",
href: "https://github.com/adaptyteam/AdaptyUI-React-Native",
},
{
label: "Unity",
href: "https://github.com/adaptyteam/AdaptyUI-Unity",
},
],
},
{
title: "Adapty SDK Sample Apps",
items: [
{
label: "iOS",
href: "https://github.com/adaptyteam/AdaptySDK-iOS/tree/master/Examples",
},
{
label: "Android",
href: "https://github.com/adaptyteam/AdaptySDK-Android",
},
{
label: "Flutter",
href: "https://github.com/adaptyteam/AdaptySDK-Flutter/tree/master/example",
},
{
label: "React Native",
href: "https://github.com/adaptyteam/AdaptySDK-React-Native",
},
{
label: "Unity",
href: "https://github.com/adaptyteam/AdaptySDK-Unity",
},
],
},
{
title: "SDK Reference",
items: [
{
label: "iOS",
href: "https://swift.adapty.io/documentation/adapty/",
},
{
label: "Android",
href: "https://kotlin.adapty.io/",
},
{
label: "Flutter",
href: "https://pub.dev/documentation/adapty_flutter/latest/adapty_flutter/adapty_flutter-library.html",
},
{
label: "React Native",
href: "https://react-native.adapty.io/classes/adapty",
},
{
label: "SDK Models",
href: "https://adapty.io/docs/sdk-models",
},
],
},
{
title: "API Reference",
items: [
{
label: "Getting started with server-side API",
href: "/getting-started-with-server-side-api",
},
{
label: "API specs",
href: "/server-side-api-specs",
},
{
label: "API objects",
href: "/server-side-api-objects",
},
],
},
{
title: "Resources",
items: [
{
label: "Adapty Dashboard",
href: "https://app.adapty.io/",
},
{
label: "Blog",
href: "https://adapty.io/blog/",
},
{
label: "Support",
href: "mailto:[email protected]",
},
],
},
],
copyright: `© ${new Date().getFullYear()} Adapty Tech Inc.`,
},
algolia: {
// The application ID provided by Algolia
appId: 'IPH9RRTSQS',
// Public API key: it is safe to commit it
apiKey: '5e3fd9357b98f9f0d44bab0f0b7634c0',
indexName: 'adapty',
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
additionalLanguages: [
"java",
"kotlin",
"swift",
"typescript",
"csharp",
"diff",
"javascript",
"dart", // For Flutter, Dart is the primary language
"toml",
"groovy",
"json",
"python",
"bash",
"http"
],
magicComments: [
// Remember to extend the default highlight class name as well!
{
className: 'theme-code-block-highlighted-line',
line: 'highlight-next-line',
block: {start: 'highlight-start', end: 'highlight-end'},
},
{
className: 'code-block-error-line',
line: 'This will error',
},
],
},
// Configure the color mode to default to light and disable the dark mode switch
colorMode: {
defaultMode: 'light', // Set default theme to light mode
disableSwitch: true, // Disable the toggle for switching themes
respectPrefersColorScheme: false, // Ignore system preference for dark mode
},
sidebar: {
autoCollapseCategories: true,
hideable: true,
},
}),
scripts: [
{
src: 'https://survey.survicate.com/workspaces/af55d3f51f8189593de1c948b75c88f6/web_surveys.js',
async: true,
},
],
};
export default config;