From ceba421997214411472c54531de441fa03d05718 Mon Sep 17 00:00:00 2001 From: Anton Nikolaev Date: Tue, 30 Nov 2021 13:24:46 -0800 Subject: [PATCH] Prepend mdx files which used as includes with underscore to avoid creating and indexing pages from them Summary: By default docusaurus generates pages and routes for every mdx file it finds under the root dir. So even for the mdx files which are only used as includes and don't even have headers, page is still created, then index and often looks very weird, e.g. title is the same as file name etc. See e.g. this one: https://www.internalfb.com/intern/staticdocs/flipper/docs/fb/portal-troubleshooting/ I went through Flipper docs and renamed all mdx files which are only used as includes to prepend them with underscore. Everything which name is starting with underscore, or which is inside a folder which name is starting with underscore is considered private by docusaurus and skipped. Reviewed By: passy Differential Revision: D32722547 fbshipit-source-id: 0524d4dd56960714fbdd2b01ad8383cd16de4948 --- .../docs/{protobuf-retrofit.mdx => _protobuf-retrofit.mdx} | 0 desktop/plugins/public/network/docs/setup.mdx | 2 +- docs/extending/desktop-plugin-structure.mdx | 4 ++-- docs/extending/testing.mdx | 4 ++-- docs/getting-started/index.mdx | 2 +- docs/troubleshooting.mdx | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) rename desktop/plugins/public/network/docs/{protobuf-retrofit.mdx => _protobuf-retrofit.mdx} (100%) diff --git a/desktop/plugins/public/network/docs/protobuf-retrofit.mdx b/desktop/plugins/public/network/docs/_protobuf-retrofit.mdx similarity index 100% rename from desktop/plugins/public/network/docs/protobuf-retrofit.mdx rename to desktop/plugins/public/network/docs/_protobuf-retrofit.mdx diff --git a/desktop/plugins/public/network/docs/setup.mdx b/desktop/plugins/public/network/docs/setup.mdx index 5c431afb0..7eff44c82 100644 --- a/desktop/plugins/public/network/docs/setup.mdx +++ b/desktop/plugins/public/network/docs/setup.mdx @@ -1,6 +1,6 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -import ProtobufRetrofitSetup from './protobuf-retrofit.mdx'; +import ProtobufRetrofitSetup from './_protobuf-retrofit.mdx'; To use the network plugin, you need to add the plugin to your Flipper client instance. diff --git a/docs/extending/desktop-plugin-structure.mdx b/docs/extending/desktop-plugin-structure.mdx index 361c73fe3..a6c60527a 100644 --- a/docs/extending/desktop-plugin-structure.mdx +++ b/docs/extending/desktop-plugin-structure.mdx @@ -3,8 +3,8 @@ id: desktop-plugin-structure title: Plugin structure --- -import FbNpmDeps from '../fb/adding-npm-dependencies-0.mdx' -import FbOnlyParts from '../fb/fb-only-parts-in-os-plugins.mdx' +import FbNpmDeps from '../fb/_adding-npm-dependencies-0.mdx' +import FbOnlyParts from '../fb/_fb-only-parts-in-os-plugins.mdx' Flipper Desktop plugins have a rigid structure. We recommend to scaffold any new plugin using our scaffolding tooling. diff --git a/docs/extending/testing.mdx b/docs/extending/testing.mdx index f3bba7178..846f3e1ae 100644 --- a/docs/extending/testing.mdx +++ b/docs/extending/testing.mdx @@ -5,8 +5,8 @@ title: Testing import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -import FbIosTesting from '../fb/ios-plugin-development-testing-ios-plugins-0.mdx'; -import FbAndroidTesting from '../fb/android-plugin-development-testing-android-plugins-0.mdx'; +import FbIosTesting from '../fb/_ios-plugin-development-testing-ios-plugins-0.mdx'; +import FbAndroidTesting from '../fb/_android-plugin-development-testing-android-plugins-0.mdx'; Developer tools are only used if they work. We have built APIs to test plugins. diff --git a/docs/getting-started/index.mdx b/docs/getting-started/index.mdx index dff363102..d5e81433c 100644 --- a/docs/getting-started/index.mdx +++ b/docs/getting-started/index.mdx @@ -4,7 +4,7 @@ title: Desktop App --- import useBaseUrl from '@docusaurus/useBaseUrl'; -import FbInstallation from './fb/installation.mdx'; +import FbInstallation from './fb/_installation.mdx'; Flipper helps you debug Android, iOS, and even web apps running in an emulator/simulator, connected physical development devices, or in your browser. Flipper consists of two parts: diff --git a/docs/troubleshooting.mdx b/docs/troubleshooting.mdx index acbafdd71..660fe293f 100644 --- a/docs/troubleshooting.mdx +++ b/docs/troubleshooting.mdx @@ -6,9 +6,9 @@ custom_edit_url: https://www.internalfb.com/intern/diffusion/FBS/browsefile/mast --- import useBaseUrl from '@docusaurus/useBaseUrl'; -import InternalTroubleshooting from './fb/internal-troubleshooting.mdx'; +import InternalTroubleshooting from './fb/_internal-troubleshooting.mdx'; -import PortalTroubleshooting from './fb/portal-troubleshooting.mdx'; +import PortalTroubleshooting from './fb/_portal-troubleshooting.mdx'; We hope that Flipper works well out of the box, but the software is a work in progress and problems will occur. Below are some known issues and steps you can take to try to resolve them.