@apify/docs-theme 1.0.249 → 1.0.251
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 +35 -1
- package/src/theme/custom.css +14 -0
package/package.json
CHANGED
package/src/config.js
CHANGED
|
@@ -120,7 +120,7 @@ const themeConfig = {
|
|
|
120
120
|
},
|
|
121
121
|
{
|
|
122
122
|
label: 'MCP CLI',
|
|
123
|
-
href: 'https://github.com/apify/
|
|
123
|
+
href: 'https://github.com/apify/mcpc',
|
|
124
124
|
},
|
|
125
125
|
{
|
|
126
126
|
label: 'Actor whitepaper',
|
|
@@ -234,6 +234,12 @@ const themeConfig = {
|
|
|
234
234
|
target: '_self',
|
|
235
235
|
rel: 'dofollow',
|
|
236
236
|
},
|
|
237
|
+
{
|
|
238
|
+
label: 'llms.txt',
|
|
239
|
+
href: `${absoluteUrl}/llms.txt`,
|
|
240
|
+
target: '_self',
|
|
241
|
+
rel: 'dofollow',
|
|
242
|
+
},
|
|
237
243
|
],
|
|
238
244
|
},
|
|
239
245
|
{
|
|
@@ -285,6 +291,34 @@ const themeConfig = {
|
|
|
285
291
|
async: true,
|
|
286
292
|
defer: true,
|
|
287
293
|
},
|
|
294
|
+
announcementBar: process.env.APIFY_DOCS_ABSOLUTE_URL
|
|
295
|
+
? (() => {
|
|
296
|
+
const parsedUrl = new URL(process.env.APIFY_DOCS_ABSOLUTE_URL);
|
|
297
|
+
|
|
298
|
+
const { hostname } = parsedUrl;
|
|
299
|
+
|
|
300
|
+
if (!hostname.includes('pr-') && !hostname.includes('preview')) {
|
|
301
|
+
return undefined;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
const prNumber = hostname.split('.')[0]?.split('-')[1];
|
|
305
|
+
|
|
306
|
+
if (!prNumber) {
|
|
307
|
+
return undefined;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
// TODO: once we support multiple preview deployments, we should pass in the repository name as an env variable
|
|
311
|
+
const githubUrl = `https://github.com/apify/apify-docs/pull/${prNumber}`;
|
|
312
|
+
|
|
313
|
+
return {
|
|
314
|
+
id: 'apify-docs-preview-banner',
|
|
315
|
+
content: `You are visiting <a href="${githubUrl}" target="_blank" rel="noopener noreferrer">a preview build for PR ${prNumber}</a> of the Apify Docs.`,
|
|
316
|
+
backgroundColor: '#B80F0A',
|
|
317
|
+
textColor: '#FFFFFF',
|
|
318
|
+
isCloseable: false,
|
|
319
|
+
};
|
|
320
|
+
})()
|
|
321
|
+
: undefined,
|
|
288
322
|
};
|
|
289
323
|
|
|
290
324
|
const plugins = [
|
package/src/theme/custom.css
CHANGED
|
@@ -967,6 +967,20 @@ nav.navbar[class*='navbarHidden'] {
|
|
|
967
967
|
transform: translate3d(0, calc(-210%), 0);
|
|
968
968
|
}
|
|
969
969
|
|
|
970
|
+
/* Pin the announcement bar to the top of the viewport and push the
|
|
971
|
+
navbar down so it sits below the bar instead of sliding under it.
|
|
972
|
+
The sibling selector keeps the navbar at top: 0 when there is no
|
|
973
|
+
announcement bar (e.g. production builds). */
|
|
974
|
+
div[class*='announcementBar_'] {
|
|
975
|
+
position: sticky;
|
|
976
|
+
top: 0;
|
|
977
|
+
z-index: calc(var(--ifm-z-index-fixed) + 1);
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
div[class*='announcementBar_'] ~ nav.navbar {
|
|
981
|
+
top: var(--docusaurus-announcement-bar-height);
|
|
982
|
+
}
|
|
983
|
+
|
|
970
984
|
.navbar__items--right a.icon,
|
|
971
985
|
div[class*='colorModeToggle'] {
|
|
972
986
|
display: initial;
|