Migrate website to Docusaurus 2

Summary:
Docusaurus 2 is quite a lot more powerful than docu 1 it turns out.
This should convert the website fully.

* [done] Go through migration guide https://v2.docusaurus.io/docs/migrating-from-v1-to-v2
* [done] Convert landing page html
* [done] Convert all images to img tags
* [done] Convert all .md files to .mdx
* [done] Make sure ui-doc generation and including still works
* [done] Scan every page visually for sanity check
* [done] Make sure footer still works
* [done] Make sure search still works
* [done] Change all links/ to links/index
* [done] Change all links.md to links
* [done] Add some custom css to make the navbar look like the old one and darken the footer.

Reviewed By: passy

Differential Revision: D21158717

fbshipit-source-id: 5f45b711b1b6fd5ece4c5c15c55635c7ebbfb568
This commit is contained in:
John Knox
2020-04-27 04:01:24 -07:00
committed by Facebook GitHub Bot
parent 297ca61c49
commit 5f1a0548f5
101 changed files with 5110 additions and 2159 deletions

View File

@@ -2,8 +2,9 @@
id: android
title: Building an Android Plugin
---
import useBaseUrl from '@docusaurus/useBaseUrl';
<img align="right" src="/docs/assets/android-tutorial-app.png" alt="Android Tutorial App" width="200">
<img alt="Android Tutorial App" src={useBaseUrl("img/android-tutorial-app.png")} />
For the purpose of the tutorial, we will assume you already have an existing
Android application in which you have a feed or list of items. As the Flipper

View File

@@ -2,8 +2,9 @@
id: intro
title: Intro
---
import useBaseUrl from '@docusaurus/useBaseUrl';
![Android App Tutorial](assets/android-tutorial.png)
<img alt="Android App Tutorial" src={useBaseUrl("img/android-tutorial.png")} />
In this tutorial, we show you how how easy it is to build a Flipper plugin
for Android and iOS that extracts data from your native application and
@@ -16,4 +17,4 @@ Before we get started, let's define two terms we will use frequently throughout
this tutorial:
- **Desktop app**: This is the Electron-based application you run on your desktop.
- **Mobile client**: This is the mobile app running most likely on a phone or other mobile device. It connects to the desktop app.
- **Mobile client**: This is the mobile app running most likely on a phone or other mobile device. It connects to the desktop app.

View File

@@ -2,8 +2,9 @@
id: ios
title: Building an iOS Plugin
---
import useBaseUrl from '@docusaurus/useBaseUrl';
<img align="right" src="/docs/assets/ios-tutorial-app.png" alt="iOS Tutorial App" width="200">
<img alt="iOS Tutorial App" src={useBaseUrl("img/ios-tutorial-app.png")} />
For the purpose of the tutorial, we will assume you already have an existing iOS application in
which you have a feed or list of items. As the Flipper team, we obviously concern ourselves mostly

View File

@@ -3,13 +3,14 @@ id: js-custom
title: Building Custom UI
sidebar_label: Custom UI
---
import useBaseUrl from '@docusaurus/useBaseUrl';
Displaying your data in a table might work for many use-cases. However, depending on your plugin and data it might make sense to customize the way your data is visualized. Flipper uses React to render the plugins and provides a variety of ready-to-use UI components that can be used to build custom plugin UIs.
## Replacing the table
For our sea mammals app, we might not only want to see them listed as image URLs in a table but render the actual images in nice little cards. When selecting one of the cards we still want to display all details in the sidebar.
![Custom cards UI for our sea mammals plugin](assets/js-custom.png)
<img alt="Custom cards UI for our sea mammals plugin" src={useBaseUrl("img/js-custom.png")} />
Currently, the default export in our `index.tsx` is from `createTablePlugin`. Now we are going to replace this with a custom React component extending `FlipperPlugin`.
@@ -34,7 +35,7 @@ export default class SeaMammals extends FlipperPlugin<State, any, PersistedState
}
```
You can see how we are styling our components using [emotion](https://emotion.sh/). To learn more about this, make sure to read our guide on [styling components](extending/styling-components.md).
You can see how we are styling our components using [emotion](https://emotion.sh/). To learn more about this, make sure to read our guide on [styling components](extending/styling-components).
## Adding data handling

View File

@@ -3,6 +3,7 @@ id: js-publishing
title: Publishing your Plugin
sidebar_label: Publishing
---
import useBaseUrl from '@docusaurus/useBaseUrl';
Once you're happy with your plugin and want the world to see it,
you can publish it to npm. Ensure that your plugin follows these
@@ -51,7 +52,7 @@ in the bottom of the left sidebar and selecting the
"Install Plugins" tab. It may take a few moments for the
search index to update and your plugin to appear.
![Install plugins](assets/install-plugins.png)
<img alt="Install plugins" src={useBaseUrl("img/install-plugins.png")} />
## Native Distribution

View File

@@ -3,12 +3,13 @@ id: js-setup
title: Building a Desktop Plugin
sidebar_label: Building a Desktop Plugin
---
import useBaseUrl from '@docusaurus/useBaseUrl';
Now that we have the native side covered, let's display the data we're sending
on the desktop side. You can check out the full workflow of building Flipper desktop
plugins here: https://fbflipper.com/docs/extending/js-setup.html.
![Custom cards UI for our sea mammals plugin](assets/js-custom.png)
<img alt="Custom cards UI for our sea mammals plugin" src={useBaseUrl("img/js-custom.png")} />
## Dynamic Plugin loading

View File

@@ -2,8 +2,9 @@
id: js-table
title: Showing a table
---
import useBaseUrl from '@docusaurus/useBaseUrl';
![Android Tutorial App](assets/android-tutorial-desktop.png)
<img alt="Android Tutorial App" src={useBaseUrl("img/android-tutorial-desktop.png")} />
## Building a Table