@apify/docs-theme 1.0.17 → 1.0.19

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.17",
3
+ "version": "1.0.19",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "files": [
@@ -20,15 +20,16 @@ export default function NavbarMobilePrimaryMenu() {
20
20
  <>
21
21
  {
22
22
  subNavbar ? <>
23
- <NavbarItem
24
- key={'title'}
25
- mobile
26
- href={baseUrl}
27
- label={subNavbar.title}
28
- />
29
- <ul className="menu__list" style={{ paddingLeft: '1rem', marginBottom: '1rem', borderBottom: '1px solid #e0e0e0', paddingBottom: '1rem' }}>
23
+ <ul className="menu__list" style={{ marginBottom: '1rem', borderBottom: '1px solid #e0e0e0', paddingBottom: '1rem' }}>
24
+ <NavbarItem
25
+ key={'title'}
26
+ mobile
27
+ href={baseUrl}
28
+ label={subNavbar.title}
29
+ />
30
30
  {subNavbar.items.map((item, i) => (
31
31
  <NavbarItem
32
+ style={{ paddingLeft: '1rem' }}
32
33
  key={i}
33
34
  mobile
34
35
  {...item}
@@ -37,15 +38,16 @@ export default function NavbarMobilePrimaryMenu() {
37
38
  </ul>
38
39
  </> : null
39
40
  }
40
- <NavbarItem
41
- key={'title2'}
42
- mobile
43
- label='Apify documentation'
44
- />
45
- <ul className="menu__list" style={{ paddingLeft: '1rem' }}>
41
+ <ul className="menu__list">
42
+ <NavbarItem
43
+ key={'title2'}
44
+ mobile
45
+ label='Apify documentation'
46
+ />
46
47
  {items.map((item, i) => (
47
48
  <NavbarItem
48
49
  mobile
50
+ style={{ paddingLeft: '1rem' }}
49
51
  {...item}
50
52
  key={i}
51
53
  />
@@ -1,49 +1,8 @@
1
1
  import React from 'react';
2
- import useBaseUrl from '@docusaurus/useBaseUrl';
3
- import useIsBrowser from '@docusaurus/useIsBrowser';
4
2
  import { PageMetadata } from '@docusaurus/theme-common';
5
- import Link from '@docusaurus/Link';
6
3
  import Layout from '@theme/Layout';
7
4
 
8
5
  export default function NotFound() {
9
- const redirectedV2Url = useBaseUrl('/docs/api');
10
- const redirectedV1Url = useBaseUrl('/docs/1.3.1/api');
11
- const baseUrlForV2Redirect = useBaseUrl(`/docs/2.3/api/`);
12
- const baseUrlForV1Redirect = useBaseUrl(`/docs/1.3/api/`);
13
- const isBrowser = useIsBrowser();
14
-
15
- if (isBrowser) {
16
- const path = window.location.pathname;
17
- let href = '';
18
- let redirect = false;
19
-
20
- if (path.startsWith(redirectedV2Url)) {
21
- href = baseUrlForV2Redirect + path.substring(redirectedV2Url.length + 1);
22
- redirect = true;
23
- }
24
-
25
- if (path.match(/\/docs\/2\.\d+\.\d+\/api/)) {
26
- href = baseUrlForV2Redirect + path.substring(redirectedV1Url.length + 1);
27
- redirect = true;
28
- }
29
-
30
- if (path.match(/\/api\/[12]\.\d+\/\w+/)) {
31
- const [, v, id] = path.match(/\/api\/([12])\.\d+\/(.*)/);
32
- href = (v === '1' ? baseUrlForV1Redirect : baseUrlForV2Redirect) + id;
33
- redirect = true;
34
- }
35
-
36
- if (path.match(/\/docs\/[01]\.\d+\.\d+\/api\/(.*)/)) {
37
- const id = path.match(/\/docs\/[01]\.\d+\.\d+\/api\/(.*)/)[1];
38
- href = baseUrlForV1Redirect + id;
39
- redirect = true;
40
- }
41
-
42
- if (redirect && window.location.href !== href) {
43
- window.location.href = href;
44
- }
45
- }
46
-
47
6
  return (
48
7
  <>
49
8
  <PageMetadata title={'Page Not Found'} />
@@ -57,17 +16,6 @@ export default function NotFound() {
57
16
  <p>
58
17
  We could not find what you were looking for 😢
59
18
  </p>
60
- <p>
61
- Recently we <b>released Apify SDK v3 </b>
62
- and we significantly upgraded the documentation.
63
- </p>
64
- <p>
65
- If you're looking for documentation of <b>Apify SDK v2</b>,
66
- <Link to={'/docs/2.3/guides/apify-platform'}> you can find it here</Link>.
67
- </p>
68
- <p>
69
- For <b>Apify SDK v3 docs</b>, go to the <Link to={'/'}>homepage</Link>.
70
- </p>
71
19
  </div>
72
20
  </div>
73
21
  </main>