From 5ad8106e3f17ba4b720205b61073d7804d4c14be Mon Sep 17 00:00:00 2001 From: John Knox Date: Thu, 2 Apr 2020 03:12:06 -0700 Subject: [PATCH] Fix image links with baseUrl Summary: When using baseUrl in site config, it adds a prefix to all link paths. But for assets, it doesn't work if you refer to them as `docs/assets/...`, you have to use just `assets/...`. Source: https://github.com/facebook/Docusaurus/issues/861 Reviewed By: passy Differential Revision: D20796933 fbshipit-source-id: 2346e42b8b548f576a1e143f56ee5236eab55073 --- docs/extending/client-plugin-lifecycle.md | 4 ++-- docs/extending/debugging.md | 4 ++-- docs/extending/layout-inspector.md | 2 +- docs/features/crash-reporter-plugin.md | 4 ++-- docs/features/databases-plugin.md | 4 ++-- docs/features/images-plugin.md | 2 +- docs/features/index.md | 2 +- docs/features/layout-plugin.md | 2 +- docs/features/logs-plugin.md | 2 +- docs/features/navigation-plugin.md | 4 ++-- docs/features/network-plugin.md | 2 +- docs/features/react-native.md | 6 +++--- docs/features/share-flipper-data.md | 4 ++-- docs/features/shared-preferences-plugin.md | 2 +- docs/getting-started.md | 2 +- docs/troubleshooting.md | 4 ++-- docs/tutorial/intro.md | 2 +- docs/tutorial/js-custom.md | 2 +- docs/tutorial/js-publishing.md | 2 +- docs/tutorial/js-setup.md | 2 +- 20 files changed, 29 insertions(+), 29 deletions(-) diff --git a/docs/extending/client-plugin-lifecycle.md b/docs/extending/client-plugin-lifecycle.md index eed3843cd..3e26227b6 100644 --- a/docs/extending/client-plugin-lifecycle.md +++ b/docs/extending/client-plugin-lifecycle.md @@ -9,7 +9,7 @@ For both types of plugin, we recommend starting work after `onConnect` is called ## Regular Plugin Lifecycle For regular plugins, `onConnect` and `onDisconnect` are triggered when the user opens the plugin in the Flipper UI, and when they switch to another plugin, respectively. -![Regular Plugin Lifecycle diagram](/docs/assets/regular-plugin-lifecycle.png) +![Regular Plugin Lifecycle diagram](assets/regular-plugin-lifecycle.png) ## Background Plugin Lifecycle For background plugins, `onConnect` is called when Flipper first connects, and `onDisconnect` when it disconnects. The user does not need to be viewing the plugin for it to send messages; they will be queued up until the next time the user opens the plugin where they will be processed. @@ -19,5 +19,5 @@ Even for background plugins, `onDisconnect` and `onConnect` may be called on a p Note that a plugin must be enabled by the user for its messages to be queued up. -![Background Plugin Lifecycle diagram](/docs/assets/bg-plugin-lifecycle.png) +![Background Plugin Lifecycle diagram](assets/bg-plugin-lifecycle.png) diff --git a/docs/extending/debugging.md b/docs/extending/debugging.md index 444f78910..b15bbd290 100644 --- a/docs/extending/debugging.md +++ b/docs/extending/debugging.md @@ -17,13 +17,13 @@ As an alternative to using built-in Developer Tools you can also attach to the r To attach the running Flipper instance open new tab in Google Chrome, navigate to "http://localhost:9222" and choose "Flipper" in the opened list. -![Attach From Google Chrome](/docs/assets/debugging-from-google-chrome.png) +![Attach From Google Chrome](assets/debugging-from-google-chrome.png) ## Visual Studio Code If you prefer to use the same editor for both coding and debugging, you can attach to the running Flipper instance for debugging right from Visual Studio Code. First of all, you need to install extension "Debugger for Chrome". Then, to start debugging, open folder `desktop` of Flipper repository in VSCode, execute `yarn start` in terminal to launch Flipper in development mode, select tab `Debug and Run`, and run task `Attach to Running Renderer`. By default this task is set as the first one, so you can just press `F5` to run it. -![Attach From Visual Studio Code](/docs/assets/debugging-from-vscode.png) +![Attach From Visual Studio Code](assets/debugging-from-vscode.png) ## Plugin missing diff --git a/docs/extending/layout-inspector.md b/docs/extending/layout-inspector.md index b0d3a8f24..b80689ab4 100644 --- a/docs/extending/layout-inspector.md +++ b/docs/extending/layout-inspector.md @@ -6,7 +6,7 @@ title: Extending Layout Inspector The Layout Inspector plugin can be extended to support new kinds of UI components. You can also extend it to customize the data made available in the sidebar. Depending on whether you want to expose new data on Android or iOS, there are different interfaces you can use. -![Layout Inspector](/docs/assets/layoutinspector.png) +![Layout Inspector](assets/layoutinspector.png) ## Android diff --git a/docs/features/crash-reporter-plugin.md b/docs/features/crash-reporter-plugin.md index a1fcee11d..059c78cad 100644 --- a/docs/features/crash-reporter-plugin.md +++ b/docs/features/crash-reporter-plugin.md @@ -8,6 +8,6 @@ title: Crash Reporter The Crash Reporter Plugin shows a notification in Flipper whenever an app crashes. You can click on the notification to see crash information like stacktrace and other metadata. For Android, you can click the "Open in Logs" button to jump to the row in the Logs plugin with the crash information. -![UI](/docs/assets/crashreporterplugin.png) +![UI](assets/crashreporterplugin.png) -![Notification](/docs/assets/crashreporterpluginnotification.png) +![Notification](assets/crashreporterpluginnotification.png) diff --git a/docs/features/databases-plugin.md b/docs/features/databases-plugin.md index e4438c424..1c0009d15 100644 --- a/docs/features/databases-plugin.md +++ b/docs/features/databases-plugin.md @@ -13,7 +13,7 @@ The Databases plugin provides developers with read-write access to their databas - see logs of past executed queries -![Databases Plugin 1](/docs/assets/databases-plugin-1.png) -![Databases Plugin 2](/docs/assets/databases-plugin-2.png) +![Databases Plugin 1](assets/databases-plugin-1.png) +![Databases Plugin 2](assets/databases-plugin-2.png) Note: this plugin is only available for Android. diff --git a/docs/features/images-plugin.md b/docs/features/images-plugin.md index 017157c1c..a357ebf20 100644 --- a/docs/features/images-plugin.md +++ b/docs/features/images-plugin.md @@ -9,7 +9,7 @@ The images plugin allows you to inspect what images were fetched, where they are coming from and selectively clear caches. Currently, the plugin supports [Fresco](https://github.com/facebook/fresco/) as backend. -![Images plugin](/docs/assets/images-plugin.png) +![Images plugin](assets/images-plugin.png) ## Cache Inspector diff --git a/docs/features/index.md b/docs/features/index.md index 726b3b5ad..475f766b3 100644 --- a/docs/features/index.md +++ b/docs/features/index.md @@ -5,7 +5,7 @@ title: Features Flipper itself only provides the architectural platform. What makes it useful are the plugins built on top of it: [Logs](logs-plugin.md), [Layout Inspector](layout-plugin.md) and [Network Inspector](network-plugin.md) are all plugins. Plugins can be built very specific to your business logic and the use-cases you have in your app. We are shipping Flipper with a couple of built-in all-purpose plugins, but we encourage you to build your own. Each plugin needs to be enabled individually. -![Layout plugin](/docs/assets/plugins.png) +![Layout plugin](assets/plugins.png) ## Build your own plugin diff --git a/docs/features/layout-plugin.md b/docs/features/layout-plugin.md index cbfad9b15..bdc5b5649 100644 --- a/docs/features/layout-plugin.md +++ b/docs/features/layout-plugin.md @@ -11,7 +11,7 @@ The Layout tab supports [Litho](https://fblitho.com) and [ComponentKit](https:// If you hover over a view or component in Flipper we will highlight the corresponding item in your app. This is perfect for debugging the bounds of your views and making sure you have the correct visual padding. -![Layout plugin](/docs/assets/layout.png) +![Layout plugin](assets/layout.png) ## Quick edits diff --git a/docs/features/logs-plugin.md b/docs/features/logs-plugin.md index d16fa3271..ec4812204 100644 --- a/docs/features/logs-plugin.md +++ b/docs/features/logs-plugin.md @@ -5,7 +5,7 @@ title: Logs The Logs plugin shows device logs without any additional setup. This is a device plugin, meaning that it is not tied to any specific app and there is no additional setup needed to see the logs. -![Logs plugin](/docs/assets/logs.png) +![Logs plugin](assets/logs.png) ## Filtering diff --git a/docs/features/navigation-plugin.md b/docs/features/navigation-plugin.md index cecaa44c2..927d97779 100644 --- a/docs/features/navigation-plugin.md +++ b/docs/features/navigation-plugin.md @@ -7,8 +7,8 @@ title: Navigation The Navigation Plugin allows users to quickly navigate to deep links within their mobile applications to help speed up the development cycle. The plugin is designed to integrate easily within your existing navigation framework or as a stand alone tool. Users can bookmark deep links and jump to them via the button in the tool bar. -![Navigation Plugin Button](/docs/assets/navigation-plugin-1.png) +![Navigation Plugin Button](assets/navigation-plugin-1.png) Navigation events within the app can also be logged to Flipper. This allows the user to view past navigation events and jump straight to them, or export the navigation events for reporting. -![Navigation Plugin UI](/docs/assets/navigation-plugin-2.png) +![Navigation Plugin UI](assets/navigation-plugin-2.png) diff --git a/docs/features/network-plugin.md b/docs/features/network-plugin.md index d85bf37f2..599cf17e9 100644 --- a/docs/features/network-plugin.md +++ b/docs/features/network-plugin.md @@ -7,6 +7,6 @@ title: Network Use the Network inspector to inspect outgoing network traffic in your apps. You can easily browse all requests being made and their responses. The plugin also supports gzipped responses. -![Network plugin](/docs/assets/network.png) +![Network plugin](assets/network.png) All request sent from the device will be listed in the plugin. Click on a request to see details like headers and body. You can filter the table for domain, method or status by clicking on the corresponding value in the table. diff --git a/docs/features/react-native.md b/docs/features/react-native.md index c77612cad..1046f8d36 100644 --- a/docs/features/react-native.md +++ b/docs/features/react-native.md @@ -3,7 +3,7 @@ id: react-native title: React Native Support --- -![React Native + React DevTools](/docs/assets/react-native-react.png) +![React Native + React DevTools](assets/react-native-react.png) The React Native and Developer tooling teams at Facebook work in close collaboration to make sure Flipper offers top-notch value out of the box for React Native development. Integration between React Native and Flipper is enabled out of the box in React Native version 0.62 and higher. @@ -16,7 +16,7 @@ In Flipper there is a dedicated device type, “React Native”, that connects t If Metro is connected, two new buttons will appear in Flipper’s main toolbar: “Reload” and “Open Dev Menu”. Both do exactly what their name suggests, without needing the agility of a pianist to get to the right keyboard combo inside your emulator. The “React Native” device will feature two plugins out of the box: “Logs” and “React DevTools”. -![React Native Action Buttons and Logs](/docs/assets/react-native-logs.png) +![React Native Action Buttons and Logs](assets/react-native-logs.png) The React DevTools allows you to inspect the component tree and tune the props and state of your React components. @@ -39,7 +39,7 @@ Beyond the React Native specific Flipper plugins described above, with Flipper y One of the greatest values of Flipper is its extensibility. Many teams across Facebook already have written their own one-off plugins that help with analysing very specific use cases. Writing plugins for Flipper doesn't require any native code, as the Flipper SDK is exposed directly to JavaScript through the [react-native-flipper](https://www.npmjs.com/package/react-native-flipper) package. -![Tic Tac Toe example plugin](/docs/assets/react-native-tictactoe.png) +![Tic Tac Toe example plugin](assets/react-native-tictactoe.png) _Example Flipper plugin: playing a game of Tic Tac Toe using Flipper and some emulators_ If you would love to build a specific (or generic) extension for Flipper check out the following pointers! Plugins for Flipper can be distributed through NPM so sharing them is trivial. diff --git a/docs/features/share-flipper-data.md b/docs/features/share-flipper-data.md index 9359896b8..bc07482f9 100644 --- a/docs/features/share-flipper-data.md +++ b/docs/features/share-flipper-data.md @@ -9,7 +9,7 @@ Flipper's diagnostic and profiling data is often used for debugging. But sometim You can export Flipper's data in a `.flipper` file. For the export to work, an active device needs to be connected to Flipper. Make sure you have selected the device you want to export in Flipper's device dropdown: -![selectedDevice](/docs/assets/shareFlipperData/selectedDevice.png) +![selectedDevice](assets/shareFlipperData/selectedDevice.png) To export Flipper's into a file, select "File" → "Export" from the menu bar and save it where ever you like. This file now can be shared with your colleagues. @@ -19,6 +19,6 @@ To export Flipper's into a file, select "File" → "Export" from the menu bar an Opening a `.flipper` file imports all the data and allows you to use Flipper as if the device was connected. However, note the device is marked as "offline". This means, while you are able to see all the date, you can not interact with it (e.g. change a view's background color), because the actual device is not present. -![importedDevice](/docs/assets/shareFlipperData/importedDevice.png) +![importedDevice](assets/shareFlipperData/importedDevice.png) For advanced users, Flipper also provides a URL handler to import data. Linking to `flipper://import/?url={LINK_TO_FLIPPER_FILE}` will launch Flipper and display the downloaded data. diff --git a/docs/features/shared-preferences-plugin.md b/docs/features/shared-preferences-plugin.md index eb06a0c0d..d8e4c8e3e 100644 --- a/docs/features/shared-preferences-plugin.md +++ b/docs/features/shared-preferences-plugin.md @@ -6,6 +6,6 @@ title: Shared Preferences Easily inspect and modify the data contained within your app's shared preferences. -![Shared Preferences Plugin](/docs/assets/shared-preferences.png) +![Shared Preferences Plugin](assets/shared-preferences.png) All changes to the given shared preference file will automatically appear in Flipper. You may also edit the values in Flipper and have them synced to your device. This can be done by clicking on the value of the specific key you wish to edit, editing the value and then pressing enter. diff --git a/docs/getting-started.md b/docs/getting-started.md index 282e9db33..90b3bd3d6 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -18,7 +18,7 @@ The desktop part of Flipper doesn't need any particular setup. Simply download t Once you start Flipper and launch an emulator/simulator or connect a device, you will already be able to see the device logs in Flipper. To see app specific data, you need to integrate our native SDKs with your app. -![Logs plugin](/docs/assets/initial.png) +![Logs plugin](assets/initial.png) ## Setup your Android app diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index 48303f7ba..0a1fc115d 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -99,7 +99,7 @@ If you experience errors such as `Undefined symbol: associated type descriptor f 1. Go to the tab `Build Settings`; 1. Search for `LD_RUNPATH_SEARCH_PATHS` (make sure that `All` is selected); 1. Double-click `Runpath Search Paths` and, in the dialog that opens, click on the plus button at the bottom-left corner and paste `/usr/lib/swift $(inherited)` there; - ![Screenshot showing the places mentioned in the first steps](/docs/assets/troubleshooting-react-native-ios-swift.png) + ![Screenshot showing the places mentioned in the first steps](assets/troubleshooting-react-native-ios-swift.png) 1. Now search for `LIBRARY_SEARCH_PATHS`; 1. Double-click `Library Search Paths` and, in the dialog that opens, add the following items: @@ -112,6 +112,6 @@ If you experience errors such as `Undefined symbol: associated type descriptor f _Note: all of them should be added as `non-recursive` (the default)._ In the end it should look like this: - ![Screenshot showing the places mentioned in the last steps](/docs/assets/troubleshooting-react-native-ios-swift-2.png) + ![Screenshot showing the places mentioned in the last steps](assets/troubleshooting-react-native-ios-swift-2.png) 1. Now you can run your build normally. diff --git a/docs/tutorial/intro.md b/docs/tutorial/intro.md index 50f924473..93058964d 100644 --- a/docs/tutorial/intro.md +++ b/docs/tutorial/intro.md @@ -3,7 +3,7 @@ id: intro title: Intro --- -![Android App Tutorial](/docs/assets/android-tutorial.png) +![Android App Tutorial](assets/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 diff --git a/docs/tutorial/js-custom.md b/docs/tutorial/js-custom.md index 5d539b52c..2aa77225b 100644 --- a/docs/tutorial/js-custom.md +++ b/docs/tutorial/js-custom.md @@ -9,7 +9,7 @@ Displaying your data in a table might work for many use-cases. However, dependin ## 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](/docs/assets/js-custom.png) +![Custom cards UI for our sea mammals plugin](assets/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`. diff --git a/docs/tutorial/js-publishing.md b/docs/tutorial/js-publishing.md index 2e2bd735f..3a2bcb154 100644 --- a/docs/tutorial/js-publishing.md +++ b/docs/tutorial/js-publishing.md @@ -41,7 +41,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](/docs/assets/install-plugins.png) +![Install plugins](assets/install-plugins.png) ## Native Distribution diff --git a/docs/tutorial/js-setup.md b/docs/tutorial/js-setup.md index fafea313c..e334eb002 100644 --- a/docs/tutorial/js-setup.md +++ b/docs/tutorial/js-setup.md @@ -7,7 +7,7 @@ sidebar_label: Building a desktop plugin Now that we have the native side covered, let's display the data we're sending on the desktop side. -![Custom cards UI for our sea mammals plugin](/docs/assets/js-custom.png) +![Custom cards UI for our sea mammals plugin](assets/js-custom.png) ## Dynamic Plugin loading