@apify/docs-theme 1.0.102 → 1.0.103

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apify/docs-theme",
3
- "version": "1.0.102",
3
+ "version": "1.0.103",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "files": [
@@ -1,17 +1,20 @@
1
- import React from 'react';
2
- import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
3
1
  import Link from '@docusaurus/Link';
2
+ import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
3
+ import React from 'react';
4
+
4
5
  import { isDifferentInstance } from '../../utils';
5
6
 
6
7
  export default function MDXA(props) {
7
8
  const { siteConfig } = useDocusaurusContext();
8
9
 
10
+ // absolute links in README, e.g. in the SDK or API Client docs, need to be converted to local `to` links
9
11
  if (props.href?.startsWith(siteConfig.url) && isDifferentInstance(siteConfig.baseUrl)) {
10
12
  const { href, ...rest } = props;
11
13
  rest.to = props.href.replace(siteConfig.url + siteConfig.baseUrl, '/');
12
14
  props = rest;
13
15
  }
14
16
 
17
+ // links to a different docusaurus instance cannot go through the client side navigation, we need a hard redirect
15
18
  if (props.href && isDifferentInstance(props.href)) {
16
19
  return <a {...props} onClick={((e) => {
17
20
  e.preventDefault();
@@ -18,6 +18,10 @@ html[data-theme='dark'] {
18
18
  --ifm-navbar-height: 68px;
19
19
  --ifm-line-height-base: 1.65;
20
20
 
21
+ --ifm-code-background: var(--ifm-pre-background) !important;
22
+ --ifm-footer-title-color: #f2f3fb;
23
+ --ifm-footer-link-color: #8d92af;
24
+
21
25
  --docusaurus-highlighted-code-line-bg: rgba(255, 255, 255, 0.1);
22
26
  --docsearch-text-color: #8d92af;
23
27
 
@@ -136,7 +140,6 @@ html[data-theme='dark'] {
136
140
  --ifm-heading-margin-top: var(--ifm-heading-margin-bottom);
137
141
  --ifm-hero-background-color: transparent;
138
142
 
139
- --ifm-code-background: var(--ifm-pre-background) !important;
140
143
  --ifm-code-padding-horizontal: 6.4px;
141
144
  --ifm-code-padding-vertical: 3.2px;
142
145
 
@@ -155,10 +158,12 @@ html[data-theme='dark'] {
155
158
  --ifm-link-hover-decoration: none;
156
159
 
157
160
  --ifm-footer-background-color: #272c3d;
158
- --ifm-footer-title-color: #f2f3fb;
159
- --ifm-footer-link-color: #8d92af;
161
+ --ifm-footer-title-color: #60626e;
162
+ --ifm-footer-link-color: #6b6e80;
160
163
  --max-layout-width: 1440px;
161
164
 
165
+ --ifm-code-background: #f6f8fa;
166
+
162
167
  --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
163
168
 
164
169
  --ifm-heading-color: #242736;
@@ -574,6 +579,10 @@ header.hero div[class^=heroButtons] {
574
579
  padding: var(--ifm-alert-padding-vertical) var(--ifm-alert-padding-horizontal);
575
580
  }
576
581
 
582
+ html[data-theme='dark'] .markdown code {
583
+ border-color: rgba(255, 255, 255, 0.1);
584
+ }
585
+
577
586
  article .card h2 {
578
587
  margin-top: 0;
579
588
  }