@apify/docs-theme 1.0.266 → 1.0.268
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/config.js +119 -74
- package/src/theme/NavbarItem/NavbarNavLink.jsx +13 -8
- package/src/theme/custom.css +12 -0
package/package.json
CHANGED
package/src/config.js
CHANGED
|
@@ -83,80 +83,132 @@ const themeConfig = {
|
|
|
83
83
|
target: '_self',
|
|
84
84
|
rel: 'dofollow',
|
|
85
85
|
},
|
|
86
|
+
// The dropdown labels below carry both `href` and `to` on purpose. `href` keeps the
|
|
87
|
+
// target absolute, so the link resolves from the client, SDK, and CLI docs sites as
|
|
88
|
+
// well. `to` tells the Docusaurus dropdown that the label is a real link, so clicking
|
|
89
|
+
// it opens the landing page instead of only toggling the menu open.
|
|
86
90
|
{
|
|
87
|
-
label: '
|
|
91
|
+
label: 'API',
|
|
88
92
|
type: 'dropdown',
|
|
89
|
-
|
|
93
|
+
href: `${absoluteUrl}/api`,
|
|
94
|
+
to: `${absoluteUrl}/api`,
|
|
95
|
+
activeBaseRegex: '^/api(/|$)',
|
|
90
96
|
position: 'right',
|
|
97
|
+
target: '_self',
|
|
98
|
+
rel: 'dofollow',
|
|
91
99
|
items: [
|
|
92
100
|
{
|
|
93
|
-
label: 'API
|
|
101
|
+
label: 'API reference',
|
|
94
102
|
href: `${absoluteUrl}/api/v2`,
|
|
95
103
|
target: '_self',
|
|
96
104
|
rel: 'dofollow',
|
|
97
105
|
},
|
|
98
106
|
{
|
|
99
|
-
label: '
|
|
100
|
-
href: `${absoluteUrl}/
|
|
107
|
+
label: 'Client for JavaScript',
|
|
108
|
+
href: `${absoluteUrl}/api/client/js/docs`,
|
|
101
109
|
target: '_self',
|
|
102
110
|
rel: 'dofollow',
|
|
103
111
|
},
|
|
104
112
|
{
|
|
105
|
-
label: '
|
|
106
|
-
href: `${absoluteUrl}/
|
|
113
|
+
label: 'Client for Python',
|
|
114
|
+
href: `${absoluteUrl}/api/client/python/docs`,
|
|
107
115
|
target: '_self',
|
|
108
116
|
rel: 'dofollow',
|
|
109
117
|
},
|
|
110
118
|
{
|
|
111
|
-
label: 'Client for
|
|
112
|
-
href:
|
|
119
|
+
label: 'Client for Go',
|
|
120
|
+
href: `https://github.com/apify/apify-client-go`,
|
|
113
121
|
target: '_self',
|
|
114
122
|
rel: 'dofollow',
|
|
115
123
|
},
|
|
116
124
|
{
|
|
117
|
-
label: 'Client for
|
|
118
|
-
href:
|
|
125
|
+
label: 'Client for PHP',
|
|
126
|
+
href: `https://github.com/apify/apify-client-php`,
|
|
119
127
|
target: '_self',
|
|
120
128
|
rel: 'dofollow',
|
|
121
129
|
},
|
|
122
130
|
{
|
|
123
|
-
label: '
|
|
124
|
-
href:
|
|
131
|
+
label: 'Client for Java',
|
|
132
|
+
href: `https://github.com/apify/apify-client-java`,
|
|
133
|
+
target: '_self',
|
|
134
|
+
rel: 'dofollow',
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
label: 'Client for .NET',
|
|
138
|
+
href: `https://github.com/apify/apify-client-dotnet`,
|
|
125
139
|
target: '_self',
|
|
126
140
|
rel: 'dofollow',
|
|
127
141
|
},
|
|
128
142
|
{
|
|
129
|
-
label: '
|
|
143
|
+
label: 'Client for Rust',
|
|
130
144
|
href: `https://github.com/apify/apify-client-rust`,
|
|
131
145
|
target: '_self',
|
|
132
146
|
rel: 'dofollow',
|
|
133
147
|
},
|
|
148
|
+
],
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
label: 'SDK',
|
|
152
|
+
type: 'dropdown',
|
|
153
|
+
href: `${absoluteUrl}/sdk`,
|
|
154
|
+
to: `${absoluteUrl}/sdk`,
|
|
155
|
+
activeBaseRegex: '^/sdk(/|$)',
|
|
156
|
+
position: 'right',
|
|
157
|
+
target: '_self',
|
|
158
|
+
rel: 'dofollow',
|
|
159
|
+
items: [
|
|
134
160
|
{
|
|
135
|
-
label: '
|
|
136
|
-
href:
|
|
161
|
+
label: 'SDK for JavaScript',
|
|
162
|
+
href: `${absoluteUrl}/sdk/js/docs/overview`,
|
|
137
163
|
target: '_self',
|
|
138
164
|
rel: 'dofollow',
|
|
139
165
|
},
|
|
140
166
|
{
|
|
141
|
-
label: '
|
|
142
|
-
href:
|
|
167
|
+
label: 'SDK for Python',
|
|
168
|
+
href: `${absoluteUrl}/sdk/python/docs/overview`,
|
|
143
169
|
target: '_self',
|
|
144
170
|
rel: 'dofollow',
|
|
145
171
|
},
|
|
172
|
+
],
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
label: 'CLI',
|
|
176
|
+
type: 'dropdown',
|
|
177
|
+
href: `${absoluteUrl}/cli`,
|
|
178
|
+
to: `${absoluteUrl}/cli`,
|
|
179
|
+
activeBaseRegex: '^/cli(/|$)',
|
|
180
|
+
position: 'right',
|
|
181
|
+
target: '_self',
|
|
182
|
+
rel: 'dofollow',
|
|
183
|
+
items: [
|
|
146
184
|
{
|
|
147
|
-
label: '
|
|
148
|
-
href:
|
|
185
|
+
label: 'Installation',
|
|
186
|
+
href: `${absoluteUrl}/cli/docs/installation`,
|
|
149
187
|
target: '_self',
|
|
150
188
|
rel: 'dofollow',
|
|
151
189
|
},
|
|
152
190
|
{
|
|
153
|
-
label: '
|
|
154
|
-
href:
|
|
191
|
+
label: 'Quick start',
|
|
192
|
+
href: `${absoluteUrl}/cli/docs/quick-start`,
|
|
193
|
+
target: '_self',
|
|
194
|
+
rel: 'dofollow',
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
label: 'Command reference',
|
|
198
|
+
href: `${absoluteUrl}/cli/docs/reference`,
|
|
155
199
|
target: '_self',
|
|
156
200
|
rel: 'dofollow',
|
|
157
201
|
},
|
|
158
202
|
],
|
|
159
203
|
},
|
|
204
|
+
{
|
|
205
|
+
label: 'MCP',
|
|
206
|
+
href: `${absoluteUrl}/integrations/mcp`,
|
|
207
|
+
activeBasePath: 'integrations/mcp',
|
|
208
|
+
position: 'right',
|
|
209
|
+
target: '_self',
|
|
210
|
+
rel: 'dofollow',
|
|
211
|
+
},
|
|
160
212
|
],
|
|
161
213
|
},
|
|
162
214
|
colorMode: {
|
|
@@ -175,34 +227,23 @@ const themeConfig = {
|
|
|
175
227
|
footer: {
|
|
176
228
|
links: [
|
|
177
229
|
{
|
|
178
|
-
title: '
|
|
230
|
+
title: 'Reference',
|
|
179
231
|
items: [
|
|
180
232
|
{
|
|
181
|
-
label: '
|
|
182
|
-
href: `${absoluteUrl}/
|
|
183
|
-
target: '_self',
|
|
184
|
-
rel: 'dofollow',
|
|
185
|
-
},
|
|
186
|
-
{
|
|
187
|
-
label: 'Get started',
|
|
188
|
-
href: `${absoluteUrl}/get-started`,
|
|
233
|
+
label: 'API Reference',
|
|
234
|
+
href: `${absoluteUrl}/api/v2`,
|
|
189
235
|
target: '_self',
|
|
190
236
|
rel: 'dofollow',
|
|
191
237
|
},
|
|
192
238
|
{
|
|
193
|
-
label: '
|
|
194
|
-
href: `${absoluteUrl}/
|
|
239
|
+
label: 'SDK for JavaScript',
|
|
240
|
+
href: `${absoluteUrl}/sdk/js/docs/overview`,
|
|
195
241
|
target: '_self',
|
|
196
242
|
rel: 'dofollow',
|
|
197
243
|
},
|
|
198
|
-
],
|
|
199
|
-
},
|
|
200
|
-
{
|
|
201
|
-
title: 'API',
|
|
202
|
-
items: [
|
|
203
244
|
{
|
|
204
|
-
label: '
|
|
205
|
-
href: `${absoluteUrl}/
|
|
245
|
+
label: 'SDK for Python',
|
|
246
|
+
href: `${absoluteUrl}/sdk/python/docs/overview`,
|
|
206
247
|
target: '_self',
|
|
207
248
|
rel: 'dofollow',
|
|
208
249
|
},
|
|
@@ -218,20 +259,9 @@ const themeConfig = {
|
|
|
218
259
|
target: '_self',
|
|
219
260
|
rel: 'dofollow',
|
|
220
261
|
},
|
|
221
|
-
],
|
|
222
|
-
},
|
|
223
|
-
{
|
|
224
|
-
title: 'SDK',
|
|
225
|
-
items: [
|
|
226
|
-
{
|
|
227
|
-
label: 'SDK for JavaScript',
|
|
228
|
-
href: `${absoluteUrl}/sdk/js/docs/overview`,
|
|
229
|
-
target: '_self',
|
|
230
|
-
rel: 'dofollow',
|
|
231
|
-
},
|
|
232
262
|
{
|
|
233
|
-
label: '
|
|
234
|
-
href: `${absoluteUrl}/
|
|
263
|
+
label: 'CLI',
|
|
264
|
+
href: `${absoluteUrl}/cli/docs`,
|
|
235
265
|
target: '_self',
|
|
236
266
|
rel: 'dofollow',
|
|
237
267
|
},
|
|
@@ -265,49 +295,64 @@ const themeConfig = {
|
|
|
265
295
|
label: 'proxy-chain',
|
|
266
296
|
href: 'https://github.com/apify/proxy-chain',
|
|
267
297
|
},
|
|
298
|
+
],
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
title: 'Security',
|
|
302
|
+
items: [
|
|
268
303
|
{
|
|
269
|
-
label: '
|
|
270
|
-
href: 'https://
|
|
304
|
+
label: 'Trust Center',
|
|
305
|
+
href: 'https://trust.apify.com',
|
|
271
306
|
},
|
|
272
307
|
],
|
|
273
308
|
},
|
|
274
309
|
{
|
|
275
|
-
title: '
|
|
310
|
+
title: 'Community',
|
|
276
311
|
items: [
|
|
277
312
|
{
|
|
278
|
-
label: '
|
|
279
|
-
href:
|
|
280
|
-
position: 'left',
|
|
281
|
-
target: '_self',
|
|
282
|
-
rel: 'dofollow',
|
|
313
|
+
label: 'Discord',
|
|
314
|
+
href: 'https://discord.com/invite/jyEM2PRvMU',
|
|
283
315
|
},
|
|
284
316
|
{
|
|
285
|
-
label: '
|
|
286
|
-
href:
|
|
287
|
-
|
|
288
|
-
|
|
317
|
+
label: 'X',
|
|
318
|
+
href: 'https://x.com/apify',
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
label: 'YouTube',
|
|
322
|
+
href: 'https://www.youtube.com/c/Apify',
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
label: 'GitHub',
|
|
326
|
+
href: 'https://github.com/apify',
|
|
289
327
|
},
|
|
290
328
|
],
|
|
291
329
|
},
|
|
292
330
|
{
|
|
293
|
-
title: '
|
|
331
|
+
title: 'For AI',
|
|
294
332
|
items: [
|
|
295
333
|
{
|
|
296
|
-
label: '
|
|
297
|
-
|
|
334
|
+
label: 'llms.txt',
|
|
335
|
+
href: `${absoluteUrl}/llms.txt`,
|
|
336
|
+
target: '_self',
|
|
298
337
|
rel: 'dofollow',
|
|
299
338
|
},
|
|
300
339
|
{
|
|
301
|
-
label: '
|
|
302
|
-
href:
|
|
340
|
+
label: 'llms-full.txt',
|
|
341
|
+
href: `${absoluteUrl}/llms-full.txt`,
|
|
342
|
+
target: '_self',
|
|
343
|
+
rel: 'dofollow',
|
|
303
344
|
},
|
|
304
345
|
{
|
|
305
|
-
|
|
306
|
-
|
|
346
|
+
label: 'OpenAPI (JSON)',
|
|
347
|
+
href: `${absoluteUrl}/api/openapi.json`,
|
|
348
|
+
target: '_self',
|
|
349
|
+
rel: 'dofollow',
|
|
307
350
|
},
|
|
308
351
|
{
|
|
309
|
-
label: '
|
|
310
|
-
href:
|
|
352
|
+
label: 'OpenAPI (YAML)',
|
|
353
|
+
href: `${absoluteUrl}/api/openapi.yaml`,
|
|
354
|
+
target: '_self',
|
|
355
|
+
rel: 'dofollow',
|
|
311
356
|
},
|
|
312
357
|
],
|
|
313
358
|
},
|
|
@@ -6,11 +6,14 @@ import useBaseUrl from '@docusaurus/useBaseUrl';
|
|
|
6
6
|
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
|
7
7
|
import { usePluginData } from '@docusaurus/useGlobalData';
|
|
8
8
|
import IconExternalLink from '@theme/Icon/ExternalLink';
|
|
9
|
+
import clsx from 'clsx';
|
|
9
10
|
import React from 'react';
|
|
10
11
|
|
|
11
12
|
export default function NavbarNavLink({
|
|
12
13
|
activeBasePath,
|
|
13
14
|
activeBaseRegex,
|
|
15
|
+
activeClassName = 'navbar__link--active',
|
|
16
|
+
className,
|
|
14
17
|
to,
|
|
15
18
|
href,
|
|
16
19
|
label,
|
|
@@ -30,7 +33,6 @@ export default function NavbarNavLink({
|
|
|
30
33
|
// TODO all this seems hacky
|
|
31
34
|
// {to: 'version'} should probably be forbidden, in favor of {to: '/version'}
|
|
32
35
|
const toUrl = useBaseUrl(to);
|
|
33
|
-
const activeBaseUrl = useBaseUrl(activeBasePath);
|
|
34
36
|
const normalizedHref = useBaseUrl(href, { forcePrependBaseUrl: true });
|
|
35
37
|
const { siteConfig } = useDocusaurusContext();
|
|
36
38
|
const isInternalUrl = (url) => {
|
|
@@ -63,16 +65,18 @@ export default function NavbarNavLink({
|
|
|
63
65
|
.some((item) => (item.to || item.href).endsWith(location.pathname));
|
|
64
66
|
|
|
65
67
|
if (href) {
|
|
68
|
+
// `Link` drops `isActive`/`activeClassName` for absolute URLs (they only work with the
|
|
69
|
+
// React Router link), so the active class has to be resolved here instead.
|
|
70
|
+
const isActive =
|
|
71
|
+
(activeBaseRegex && isRegexpStringMatch(activeBaseRegex, location.pathname)) ||
|
|
72
|
+
(activeBasePath && location.pathname.startsWith(`/${activeBasePath}`)) ||
|
|
73
|
+
dropDownHasActiveItem;
|
|
74
|
+
|
|
66
75
|
return (
|
|
67
76
|
<Link
|
|
68
77
|
href={prependBaseUrlToHref ? normalizedHref : href}
|
|
69
78
|
{...props}
|
|
70
|
-
{
|
|
71
|
-
className:
|
|
72
|
-
location.pathname.startsWith(`/${activeBasePath}`) || dropDownHasActiveItem
|
|
73
|
-
? 'navbar__item navbar__link navbar__link--active'
|
|
74
|
-
: 'navbar__item navbar__link',
|
|
75
|
-
})}
|
|
79
|
+
className={clsx(className, isActive && activeClassName)}
|
|
76
80
|
{...linkContentProps}
|
|
77
81
|
/>
|
|
78
82
|
);
|
|
@@ -82,13 +86,14 @@ export default function NavbarNavLink({
|
|
|
82
86
|
<Link
|
|
83
87
|
to={toUrl}
|
|
84
88
|
isNavLink
|
|
89
|
+
className={className}
|
|
85
90
|
{...((activeBasePath || activeBaseRegex) && {
|
|
86
91
|
// eslint-disable-next-line no-shadow
|
|
87
92
|
isActive: (_match, location) =>
|
|
88
93
|
activeBaseRegex
|
|
89
94
|
? isRegexpStringMatch(activeBaseRegex, location.pathname) || dropDownHasActiveItem
|
|
90
95
|
: location.pathname.startsWith(`/${activeBasePath}`),
|
|
91
|
-
activeClassName
|
|
96
|
+
activeClassName,
|
|
92
97
|
})}
|
|
93
98
|
{...props}
|
|
94
99
|
{...linkContentProps}
|
package/src/theme/custom.css
CHANGED
|
@@ -997,6 +997,18 @@ div[class*='searchBox'] {
|
|
|
997
997
|
}
|
|
998
998
|
}
|
|
999
999
|
|
|
1000
|
+
/*
|
|
1001
|
+
* Just above the mobile breakpoint the two halves of the nav link row run out of room and
|
|
1002
|
+
* collide. The switch to the mobile sidebar is pinned to 996px in Docusaurus (both Infima
|
|
1003
|
+
* and the JS `useWindowSize`), so the row has to fit down to that width instead: tighten
|
|
1004
|
+
* the spacing between the right-hand links until the layout has room again.
|
|
1005
|
+
*/
|
|
1006
|
+
@media (min-width: 997px) and (max-width: 1100px) {
|
|
1007
|
+
.navbar__inner--subnavbar .navbar__items--right {
|
|
1008
|
+
gap: 0.4rem;
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1000
1012
|
/* @media (min-width: 997px) and (max-width: 1250px) {
|
|
1001
1013
|
.navbar__items--right a.icon {
|
|
1002
1014
|
display: none;
|