Skip to content

Commit

Permalink
Fixed docusaurus build (#6496)
Browse files Browse the repository at this point in the history
The `docs` and `api` folders where moved into the `docs` folder so only one preset could be used.
Also had to rename a removed docusaurus options and fix broken links. I deleted a `docs/README.mdx` file that seemed no longer in used and contained a broken link.

* Merge docusaurus website presets
* Renamed removed docusaurus option
* Fixed broken links
* Removed README.mdx as it seems to be a unused leftover

Co-authored-by: Guy Carmeli <guyca@users.noreply.github.com>
  • Loading branch information
danilobuerger and guyca authored Aug 23, 2020
1 parent 12a615b commit 5dfbcfe
Show file tree
Hide file tree
Showing 75 changed files with 75 additions and 121 deletions.
13 changes: 0 additions & 13 deletions website/docs/README.mdx

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Large title text color.

### `fontFamily`

Set the large title [FontFamily](fonts.mdx).
Set the large title [FontFamily](../docs/style-fonts.mdx).

| Type | Required | Platform |
| ---------- | -------- | -------- |
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ In the previous section we created a stack and initialized it with a single chil

In order to push another screen to the stack, we will add a button to the home screen and call `Navigation.push`. The 'push' command accepts two parameters, the first is the id used to indicate into which stack to push the screen and the second is the screen we're pushing. After pushing a screen, a back button is added automatically to the TopBar so the users can navigate easily back to the previous screen.

You can read more about the stack layout [here](stack.mdx) or dive right into the API [here](../api/layout-stack).
You can read more about the stack layout [here](docs-stack.mdx) or dive right into the API [here](../api/layout-stack).

:::info componentId
Each React component registered with `Navigation.registerComponent` is assigned a unique `componentId` by Navigation. This unique id is used with Navigation commands (like the push command) to indicate into which stack we'd like to push. In this case, by using the componentId of the Home screen, we are telling Navigation to push into the stack containing the Home screen.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
34 changes: 9 additions & 25 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ module.exports = {
alt: 'React Native Navigation Logo',
src: 'img/logo.png',
},
links: [
{to: 'docs/before-you-start', label: 'Docs', position: 'left', activeBasePath: 'docs'},
{to: 'api/component', label: 'API', position: 'left', activeBasePath: 'api'},
items: [
{ to: 'docs/before-you-start', label: 'Docs', position: 'left', activeBasePath: 'docs' },
{ to: 'api/component', label: 'API', position: 'left', activeBasePath: 'api' },
{
href: 'https://github.com/wix/react-native-navigation',
label: 'GitHub',
Expand All @@ -30,7 +30,7 @@ module.exports = {
},
algolia: {
apiKey: '6d8c985d9db80241d117497afe2a0e8c',
indexName: 'wix_react-native-navigation'
indexName: 'wix_react-native-navigation',
},
sidebarCollapsible: false,
footer: {
Expand All @@ -50,7 +50,7 @@ module.exports = {
{
label: 'Contributing',
to: 'docs/meta-contributing',
}
},
],
},
{
Expand All @@ -67,7 +67,7 @@ module.exports = {
{
label: 'Submit on issue on GitHub',
href: 'https://github.com/wix/react-native-navigation/issues/new/choose',
}
},
],
},
{
Expand All @@ -83,7 +83,7 @@ module.exports = {
},
],
},
]
],
},
},
presets: [
Expand All @@ -92,30 +92,14 @@ module.exports = {
{
docs: {
sidebarPath: require.resolve('./sidebars.js'),
routeBasePath: 'docs',
routeBasePath: '/',
path: 'docs',
editUrl:
'https://github.com/wix/react-native-navigation/edit/master/website'
editUrl: 'https://github.com/wix/react-native-navigation/edit/master/website',
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
},
],
[
'@docusaurus/preset-classic',
{
docs: {
routeBasePath: 'api',
path: 'api',
sidebarPath: require.resolve('./sidebarsApi.js'),
editUrl:
'https://github.com/wix/react-native-navigation/edit/master/website'
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
},
]
],
};
85 changes: 64 additions & 21 deletions website/sidebars.js
Original file line number Diff line number Diff line change
@@ -1,31 +1,74 @@
module.exports = {
api: {
Navigation: ['api/component', 'api/root', 'api/stack', 'api/modal', 'api/overlay'],
Layouts: [
'api/layout-layout',
'api/layout-component',
'api/layout-stack',
'api/layout-bottomTabs',
'api/layout-sideMenu',
'api/layout-splitView',
],
Options: [
'api/options-api',
'api/options-root',
'api/options-bottomTabs',
'api/options-bottomTab',
{
Stack: [
'api/options-stack',
'api/options-title',
'api/options-subtitle',
'api/options-background',
'api/options-backButton',
'api/options-button',
'api/options-iconInsets',
'api/options-largeTitle',
],
},
'api/options-statusBar',
'api/options-layout',
'api/options-modal',
'api/options-navigationBar',
'api/options-overlay',
'api/options-sideMenu',
'api/options-sideMenuSide',
'api/options-splitView',
],
Events: ['api/events'],
},
docs: {
'Getting Started': ['before-you-start', 'installing', 'playground-app', 'showcases'],
'Getting Started': [
'docs/before-you-start',
'docs/installing',
'docs/playground-app',
'docs/showcases',
],
'Using the app': [
'app-launch',
'basic-navigation',
'advanced-navigation',
'screen-lifecycle',
'passing-data-to-components',
'functionalComponents',
'docs/app-launch',
'docs/basic-navigation',
'docs/advanced-navigation',
'docs/screen-lifecycle',
'docs/passing-data-to-components',
'docs/functionalComponents',
],
Layouts: ['stack', 'bottomTabs', 'sideMenu', 'externalComponent'],
Hierarchy: ['root', 'modal', 'overlay'],
Layouts: ['docs/stack', 'docs/bottomTabs', 'docs/sideMenu', 'docs/externalComponent'],
Hierarchy: ['docs/root', 'docs/modal', 'docs/overlay'],
Styling: [
'style-options',
'style-theme',
'style-statusBar',
'style-orientation',
'style-animations',
'style-fonts',
'style-constants',
'docs/style-options',
'docs/style-theme',
'docs/style-statusBar',
'docs/style-orientation',
'docs/style-animations',
'docs/style-fonts',
'docs/style-constants',
],
'Third party integration': [
'community-libraries',
'third-party-typescript',
'third-party-mobx',
'third-party-react-context',
'docs/community-libraries',
'docs/third-party-typescript',
'docs/third-party-mobx',
'docs/third-party-react-context',
],
Meta: ['meta-contributing'],
Meta: ['docs/meta-contributing'],
},
};
60 changes: 0 additions & 60 deletions website/sidebarsApi.js

This file was deleted.

0 comments on commit 5dfbcfe

Please sign in to comment.