Skip to content

Commit 4068af6

Browse files
committed
Upgrade docusaurus to stable
1 parent 8fc332e commit 4068af6

File tree

11 files changed

+3147
-4567
lines changed

11 files changed

+3147
-4567
lines changed

docusaurus.config.js

+6-7
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,15 @@ module.exports = {
1818
id: 'support_ukraine',
1919
content:
2020
'Support Ukraine 🇺🇦 <a target="_blank" rel="noopener noreferrer" href="https://opensource.facebook.com/support-ukraine"> Help Provide Humanitarian Aid to Ukraine</a>.',
21-
backgroundColor: '#20232a',
22-
textColor: '#fff',
23-
isCloseable: false,
24-
},
25-
googleAnalytics: {
26-
trackingID: 'UA-10128745-16',
21+
backgroundColor: '#e4e0f0',
22+
textColor: '#000',
2723
},
2824
prism: {
2925
theme: require('prism-react-renderer/themes/github'),
3026
darkTheme: require('prism-react-renderer/themes/dracula'),
3127
},
3228
algolia: {
29+
appId: 'bh4d9od16a',
3330
apiKey: '2378e3838ac984c220a994bfc0e0420f',
3431
indexName: 'react-navigation',
3532
algoliaOptions: {},
@@ -159,10 +156,12 @@ module.exports = {
159156
includeCurrentVersion: false,
160157
lastVersion: '6.x',
161158
},
162-
sidebarCollapsible: false,
163159
theme: {
164160
customCss: require.resolve('./src/css/custom.css'),
165161
},
162+
googleAnalytics: {
163+
trackingID: 'UA-10128745-16',
164+
},
166165
},
167166
],
168167
],

package.json

+4-6
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,12 @@
1414
"fetch-sponsors": "node scripts/fetch-sponsors.js"
1515
},
1616
"dependencies": {
17-
"@docusaurus/core": "2.0.0-beta.7",
18-
"@docusaurus/plugin-google-analytics": "2.0.0-beta.7",
19-
"@docusaurus/preset-classic": "2.0.0-beta.7",
20-
"@docusaurus/remark-plugin-npm2yarn": "2.0.0-beta.7",
17+
"@docusaurus/core": "^2.3.1",
18+
"@docusaurus/plugin-google-analytics": "^2.3.1",
19+
"@docusaurus/preset-classic": "^2.3.1",
20+
"@docusaurus/remark-plugin-npm2yarn": "^2.3.1",
2121
"@octokit/graphql": "^4.8.0",
2222
"@react-navigation/core": "^6.0.1",
23-
"classnames": "^2.3.1",
24-
"docsearch.js": "^2.6.3",
2523
"escape-html": "^1.0.3",
2624
"mkdirp": "^1.0.4",
2725
"netlify-plugin-cache": "^1.0.3",

src/components/LinkingTester.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import Editor from 'react-simple-code-editor';
55
import Highlight, { defaultProps } from 'prism-react-renderer';
66
import github from 'prism-react-renderer/themes/github';
77
import dracula from 'prism-react-renderer/themes/dracula';
8-
import ThemeContext from '@theme/ThemeContext';
8+
import {useColorMode} from '@docusaurus/theme-common';
99
import RouteMap from './RouteMap';
1010

1111
const parse = (value) => eval(`(function() { return ${value}; }())`);
@@ -29,8 +29,8 @@ function Code({ code, theme, language }) {
2929
}
3030

3131
export default function LinkingTester() {
32-
const { isDarkTheme } = React.useContext(ThemeContext);
33-
const theme = isDarkTheme ? dracula : github;
32+
const {colorMode} = useColorMode();
33+
const theme = colorMode === 'dark' ? dracula : github;
3434

3535
const [rawConfig, setRawConfig] = React.useState(
3636
`{

src/css/custom.css

+18
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
--ifm-home-color-border: #414360;
2525
--ifm-home-color-black: #25292e;
2626
--ifm-home-color-white: #f7f7ff;
27+
28+
--ifm-menu-color-background-active: rgb(107, 82, 174, 0.1);
2729
}
2830

2931
:root[data-theme='dark'] {
@@ -42,6 +44,22 @@
4244
--ifm-home-color-border: #f7f7ff;
4345
}
4446

47+
.menu {
48+
font-weight: var(--ifm-font-weight-normal);
49+
}
50+
51+
.menu::-webkit-scrollbar-track {
52+
background: transparent;
53+
}
54+
55+
.menu__list-item-collapsible > .menu__link {
56+
font-weight: var(--ifm-font-weight-semibold);
57+
}
58+
59+
.menu__link--sublist-caret:after {
60+
background: var(--ifm-menu-link-sublist-icon) 50% / 1.5rem 1.5rem;
61+
}
62+
4563
.docusaurus-highlight-code-line {
4664
background-color: rgb(72, 77, 91);
4765
display: block;

src/pages/help.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export default function Help () {
5555
post a question to StackOverflow
5656
</a>.
5757
</p>
58-
58+
5959
</div>
6060
{supportLinks && supportLinks.length && (
6161
<section className="margin-vert--xl">

src/pages/index.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React from 'react';
2-
import classnames from 'classnames';
32
import Layout from '@theme/Layout';
43
import Link from '@docusaurus/Link';
54
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';

src/plugins/remark-npm2yarn/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,4 @@ module.exports = () => {
8989
return null;
9090
};
9191
return transformer;
92-
};
92+
};

src/theme/DocVersionSuggestions/index.js

-71
This file was deleted.

0 commit comments

Comments
 (0)