@apify/docs-theme 1.0.234 → 1.0.236
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
|
@@ -7,7 +7,9 @@
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
.headingCopyIcon {
|
|
10
|
-
display:
|
|
10
|
+
display: inline-block;
|
|
11
|
+
opacity: 0;
|
|
12
|
+
pointer-events: none;
|
|
11
13
|
position: relative;
|
|
12
14
|
left: .4rem;
|
|
13
15
|
color: var(--ifm-color-emphasis-700);
|
|
@@ -24,11 +26,13 @@ h3:hover .headingCopyIcon,
|
|
|
24
26
|
h4:hover .headingCopyIcon,
|
|
25
27
|
h5:hover .headingCopyIcon,
|
|
26
28
|
h6:hover .headingCopyIcon {
|
|
27
|
-
|
|
29
|
+
opacity: 1;
|
|
30
|
+
pointer-events: auto;
|
|
28
31
|
}
|
|
29
32
|
|
|
30
33
|
.headingCopyIcon.copied {
|
|
31
|
-
|
|
34
|
+
opacity: 1;
|
|
35
|
+
pointer-events: auto;
|
|
32
36
|
}
|
|
33
37
|
|
|
34
38
|
.headingCopyIcon.copied svg {
|
|
@@ -44,4 +48,3 @@ h6:hover .headingCopyIcon {
|
|
|
44
48
|
vertical-align: middle;
|
|
45
49
|
line-height: 1;
|
|
46
50
|
}
|
|
47
|
-
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Head from '@docusaurus/Head';
|
|
2
|
+
import { useAllDocsData } from '@docusaurus/plugin-content-docs/client';
|
|
2
3
|
import { useLocation } from '@docusaurus/router';
|
|
3
4
|
// cannot use any of the theme aliases here as it causes a circular dependency :( ideas welcome
|
|
4
5
|
import Layout from '@docusaurus/theme-classic/lib/theme/Layout/index';
|
|
@@ -9,8 +10,14 @@ import React from 'react';
|
|
|
9
10
|
export default function LayoutWrapper(props) {
|
|
10
11
|
const { options: { subNavbar } } = usePluginData('@apify/docs-theme');
|
|
11
12
|
const baseUrl = useBaseUrl('/');
|
|
12
|
-
const
|
|
13
|
-
const
|
|
13
|
+
const { pathname } = useLocation();
|
|
14
|
+
const currentPath = pathname.replace(new RegExp(`^${baseUrl}`), '').trim();
|
|
15
|
+
const allDocsData = useAllDocsData();
|
|
16
|
+
const isVersionedPage = Object.values(allDocsData).some(
|
|
17
|
+
(pluginData) => pluginData.versions.some((version) => !version.isLast && pathname.startsWith(version.path)),
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
const shouldRenderAlternateLink = currentPath && currentPath !== '404' && !isVersionedPage;
|
|
14
21
|
|
|
15
22
|
const alternateMarkdownLink = useBaseUrl(`/${currentPath}.md`, { absolute: true });
|
|
16
23
|
|