@apify/docs-theme 1.0.159 → 1.0.161
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 +1 -1
- package/src/theme/MDXComponents/A.js +4 -0
- package/src/theme/custom.css +4 -0
- package/static/js/custom.js +3 -3
package/package.json
CHANGED
package/src/config.js
CHANGED
|
@@ -227,7 +227,7 @@ const themeConfig = ({
|
|
|
227
227
|
},
|
|
228
228
|
{
|
|
229
229
|
label: 'Open source',
|
|
230
|
-
href: `${absoluteUrl}/open-source
|
|
230
|
+
href: `${absoluteUrl}/open-source`,
|
|
231
231
|
position: 'left',
|
|
232
232
|
target: '_self',
|
|
233
233
|
rel: 'dofollow',
|
|
@@ -7,6 +7,10 @@ import { isDifferentInstance } from '../../utils';
|
|
|
7
7
|
export default function MDXA(props) {
|
|
8
8
|
const { siteConfig } = useDocusaurusContext();
|
|
9
9
|
|
|
10
|
+
if (props.href?.startsWith(siteConfig.url)) {
|
|
11
|
+
props.target = '_self';
|
|
12
|
+
}
|
|
13
|
+
|
|
10
14
|
// absolute links in README, e.g. in the SDK or API Client docs, need to be converted to local `to` links
|
|
11
15
|
if (props.href?.startsWith(siteConfig.url) && isDifferentInstance(siteConfig.baseUrl)) {
|
|
12
16
|
const { href, ...rest } = props;
|
package/src/theme/custom.css
CHANGED
|
@@ -1021,6 +1021,10 @@ aside li.section-header > .menu__list {
|
|
|
1021
1021
|
background: inherit !important;
|
|
1022
1022
|
}
|
|
1023
1023
|
|
|
1024
|
+
.theme-doc-sidebar-menu > li.section-header > ul > li.theme-doc-sidebar-item-category-level-2 {
|
|
1025
|
+
margin-bottom: 1rem;
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1024
1028
|
.beta-chip {
|
|
1025
1029
|
display: inline-block;
|
|
1026
1030
|
border: 1px solid #ccc;
|
package/static/js/custom.js
CHANGED
|
@@ -63,13 +63,13 @@ function scrollSidebarItemIntoView() {
|
|
|
63
63
|
|
|
64
64
|
// handles automatic scrolling of the API reference sidebar (openapi-docs)
|
|
65
65
|
function scrollOpenApiSidebarItemIntoView() {
|
|
66
|
-
const $li = document.
|
|
66
|
+
const $li = document.querySelectorAll(`ul.theme-doc-sidebar-menu a.menu__link--active[href]`);
|
|
67
67
|
|
|
68
|
-
if (
|
|
68
|
+
if ($li.length === 0) {
|
|
69
69
|
return;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
$li.scrollIntoView({
|
|
72
|
+
$li[$li.length - 1].scrollIntoView({
|
|
73
73
|
block: 'nearest',
|
|
74
74
|
inline: 'center',
|
|
75
75
|
});
|