-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathdocusaurus.config.js
More file actions
295 lines (282 loc) · 8.52 KB
/
docusaurus.config.js
File metadata and controls
295 lines (282 loc) · 8.52 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
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
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
const { themes } = require('prism-react-renderer')
const path = require('path');
const redirects = require("./redirects.json");
const lightCodeTheme = themes.github;
const darkCodeTheme = themes.dracula;
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'Clarifai Docs',
tagline: 'Clarifai Docs',
url: 'https://docs.clarifai.com',
baseUrl: '/',
onBrokenLinks: 'throw',
markdown: {
hooks: {
onBrokenMarkdownLinks: 'warn',
},
},
favicon: 'img/favicon.svg',
organizationName: 'clarifai',
projectName: 'docs',
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
routeBasePath: '/', // Serve the docs at the site's root
sidebarPath: require.resolve('./sidebars.js'),
/* Removed Edit This Page feature
editUrl: ({ versionDocsDirPath, docPath }) =>
`https://github.com/Clarifai/docs/blob/main/${versionDocsDirPath}/${docPath}`,
*/
docItemComponent: require.resolve('./src/components/CustomDocItem/index.js'),
docCategoryGeneratedIndexComponent: require.resolve('./src/components/CustomDocCategory/index.js'),
},
blog: false,
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
googleTagManager: {
containerId: "GTM-5W9P7GR"
},
gtag: {
trackingID: 'G-3R20NHSS5H',
anonymizeIP: true,
},
sitemap: {
changefreq: 'weekly',
priority: 0.5,
ignorePatterns: ['/tags/**'],
filename: 'sitemap.xml',
},
}),
],
[
'redocusaurus',
{
// Plugin Options for loading OpenAPI files
specs: [
// Pass it a path to a local OpenAPI YAML file
{
// Redocusaurus will automatically bundle your spec into a single file during the build
spec: 'static/api-spec/clarifai-v3.json',
route: '/api-reference',
},
],
theme: {
// Change with your site colors
primaryColor: '#a5b4fc',
},
config: path.join(__dirname, 'redocly.yaml'),
},
]
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
algolia: {
appId: 'E9LMD97ZH2',
apiKey: 'bb83e0130652ea667b2a9fd12ddb974b',
indexName: 'clarifai',
insights: true, // Optional, automatically send insights when user interacts with search results
container: 'div',
debug: false, // Set debug to true if you want to inspect the modal
askAi: 'XJeh2AHeZQsK',
},
announcementBar: {
id: 'support_us_' + Date.now(),
content:
'<span>Clarifai Reasoning Engine:</span>Benchmarked by Artificial Analysis on GPT-OSS-120B → 544 tokens/sec, 3.6s TTFA, $0.16/M — Faster, Cheaper, Adaptive. <a target="_blank" rel="noopener noreferrer" href="https://www.clarifai.com/press-release-clarifai-launches-reasoning-engine-optimized-for-agentic-ai-inference">Learn More.</a>',
isCloseable: true,
},
navbar: {
title: '',
logo: {
alt: 'Clarifai Docs',
src: 'img/logo-dark.svg',
srcDark: 'img/logo-light.svg',
href: '/',
},
items: [
{
type: "dropdown",
label: "API References",
position: "left",
items: [
{
label: "Python SDK Reference",
to: "/resources/api-references/python",
},
{
label: "Node.js SDK Reference",
to: "/resources/api-references/node/"
},
{
label: "Postman API Reference",
href: "https://documenter.getpostman.com/view/24309294/2sBXijHWuM"
},
{
label: "Swagger API Reference",
href: "https://api.clarifai.com/api-doc/?url=https://api.clarifai.com/v2/swagger.json"
}
]
},
{
type: 'search',
position: 'right',
},
{
href: 'https://github.com/Clarifai/docs',
className: "header-github-link",
position: 'right',
'aria-label': 'Github repository'
},
{
href: 'https://discord.gg/WgUvPK4pVD',
className: 'header-discord-link',
position: 'right',
'aria-label': 'Discord'
},
{
href: 'https://x.com/clarifai',
className: 'header-x-link',
position: 'right',
'aria-label': 'X'
},
{
href: 'https://www.linkedin.com/company/clarifai/',
className: 'header-linkedin-link',
position: 'right',
'aria-label': 'LinkedIn'
},
{
label: 'Login',
href: "https://clarifai.com/login?__hstc=56460205.941fd3bdff0d161c2f70ccba4c9dcb6b.1707280236564.1715406292479.1715409915530.11&__hssc=56460205.1.1715409915530&__hsfp=1566939966",
className: 'login-link',
position: 'right',
'aria-label': 'Login'
},
{
label: 'Start for free',
href: "https://clarifai.com/signup?__hstc=56460205.941fd3bdff0d161c2f70ccba4c9dcb6b.1707280236564.1715406292479.1715409915530.11&__hssc=56460205.1.1715409915530&__hsfp=1566939966",
className: 'signup-button',
position: 'right',
'aria-label': 'Start for free'
},
],
},
footer: {
style: 'dark',
links: [
{
title: 'Company',
items: [
{
label: 'Clarifai Website',
href: 'https://clarifai.com',
},
{
label: 'Contact Us',
href: 'https://www.clarifai.com/explore/contact-us',
},
],
},
{
title: 'Community',
items: [
{
label: 'Discord',
href: 'https://discord.gg/WgUvPK4pVD',
},
{
label: 'YouTube',
href: 'https://www.youtube.com/@theworldsai',
},
{
label: 'X',
href: 'https://x.com/clarifai',
},
],
},
{
title: 'More',
items: [
{
label: 'LinkedIn',
href: 'https://www.linkedin.com/company/clarifai',
},
{
label: 'GitHub',
href: 'https://github.com/Clarifai/docs',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} Clarifai, Inc.`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
// Issue with docusaurus & Redocusaurus on loading the code theme
// Reference: https://github.com/PrismJS/prism/issues/3458#issuecomment-1134426181
additionalLanguages: ['php', 'java', 'csharp', 'objectivec', 'bash', 'scala'],
},
colorMode: {
defaultMode: 'dark',
disableSwitch: false,
respectPrefersColorScheme: true,
},
docs: {
sidebar: {
hideable: true
}
},
}),
plugins: [
[
'@docusaurus/plugin-client-redirects',
{
redirects,
},
],
[
'plugin-image-zoom', {}
],
[
'docusaurus-plugin-llms',
{
generateLLMsTxt: true,
generateLLMsFullTxt: true,
excludeImports: true,
removeDuplicateHeadings: true,
llmsFullTxtFilename: 'llms-full.txt',
}
]
],
scripts: [
{
src: "/scripts/sidebar.js",
async: true,
},
{
src: "/scripts/intercomConfig.js",
async: true,
},
{
src: "https://cdn.amplitude.com/libs/analytics-browser-2.12.0-min.js.gz",
defer: true, // load after HTML is parsed; preserves the order in this array
},
{
src: "https://cdn.amplitude.com/libs/plugin-session-replay-browser-1.4.0-min.js.gz",
defer: true,
},
{
src: "/scripts/amplitude.js",
defer: true,
},
],
};
module.exports = config;