Summary:
This diff changes the way on how plugin documentation is produced. Instead of keeping plugin documentation together with other docs, we will now keep it together with plugin code. There are multiple advantages of such solution:
1. We are generating docs for every plugin in a standartised way so all of them looks similar. We can also use plugin metadata for generation as well (e.g. take title, icon, oncall name etc from package.json).
2. Standartised plugin docs make it possible to build docs both for websites (public and internal) and for embedding into Flipper.
3. It will hopefully incentivise authors to write docs as they will be a part of plugin "package".
4. We can scaffold documentation template using scarf to further incentivise filling it.
Reviewed By: jknoxville
Differential Revision: D29378053
fbshipit-source-id: 66ea48dc9ba225fabfb256ae6a10f8c81eef6f5f
Summary:
This PR adds missing Objective-C entry to the Docusaurus config, fixes Objective-C code blocks label and adds or replaces several code block labels to improve the currently highlighted blocks.
Prism in Docusaurus by default also includes syntax highlight for `jsx` and `tsx`, which improves the nodes and props highlight, so I have used those syntaxes in few places too.
I have also fixed one typo that I have spotted and my IDE made a cleanup of whitespaces in edited files.
## Changelog
* [website] improve docs code blocks highlighting
Pull Request resolved: https://github.com/facebook/flipper/pull/2049
Test Plan:
The changes have been tested running Flipper website on `localhost`.
## Preview
<img width="650" alt="Screenshot 2021-03-12 150934" src="https://user-images.githubusercontent.com/719641/110951135-fff20d00-8344-11eb-96db-1bdc82c8d5ea.png">
<img width="649" alt="Screenshot 2021-03-12 151022" src="https://user-images.githubusercontent.com/719641/110951268-2ca62480-8345-11eb-9d3b-1a48f1267776.png">
Reviewed By: priteshrnandgaonkar
Differential Revision: D27336599
Pulled By: passy
fbshipit-source-id: c2dfb3d8cad4675da0f5e1270cada1e56a0175c0
Summary:
This small PR aims to tweak a bit website appearance and fix small UI issue:
* footer background has been changed to reversed splash gradient
<img width="1104" alt="Screenshot 2021-03-04 131823" src="https://user-images.githubusercontent.com/719641/109964907-8cba1c80-7cee-11eb-8905-2fa82533cfd7.png">
* GitHub link in the Navbar has been moved to the tight and text was replaced with icon (like on few other Docusaurus sites)
<img width="557" alt="Screenshot 2021-03-04 133112" src="https://user-images.githubusercontent.com/719641/109965233-f9351b80-7cee-11eb-84d6-30788f662fbf.png">
* Navbar brand title ("Flipper") hover color issues has been fixed, now hover effect is the same as other navbar links
## Changelog
N/A
Pull Request resolved: https://github.com/facebook/flipper/pull/1998
Test Plan: Flipper website run on `localhost`.
Reviewed By: mweststrate
Differential Revision: D26888499
Pulled By: passy
fbshipit-source-id: e8abeace8c1d6ae8dcc46c2381009c2bd2500005
Summary:
The redirects we added inline in the deleted pages don't work when there's a baseUrl.
This is because it's the standard react-router Redirect component, which knows nothing about docusaurus sites.
We could get around that by adding `useBaseUrl()` calls around all of them, but that's not great.
So changing to using declarative redirects instead, where they are all put in config. This automatically takes care of base urls, and reduces copy-pasted code.
Reviewed By: passy
Differential Revision: D25780599
fbshipit-source-id: c67d3643ab28f0fcd440904baf54c67687781686
Summary:
I think there's a need for an "implementation details" section of the site. Especially as we're moving the rest of our wiki content there.
I see it as a good thing, because now we have a place for implementation details relevant to OSS contributors too, it's not all fb-specific.
Reviewed By: nikoant
Differential Revision: D25614909
fbshipit-source-id: 5ec081e6450a9ad1c30785ae4cca74b6fa0d2630
Summary:
Ran the wiki migration script on the Flipper_Internals wiki.
Deleted the pages mentioned in https://www.internalfb.com/tasks/?t=81712504
Also deleted hacking-launcher, which is now succeeded by the new "hacking-on-launcher".
Reviewed By: nikoant
Differential Revision: D25613387
fbshipit-source-id: b57b3e20f37b556774d7748477a1dbb7fe844812
Summary:
This diff restructures the 'extending' section of the docs, and rebrands it to 'creating plugins'. It then restructures this section into 4 top-level items
* Tutorial
* Desktop plugin APIs
* Client plugin APIs
* Workflow
Pages are put under the relevant sections, including pages which were before under internal. Some pages that didn't relate directly to plugin development have been moved to other top level sections (e.g. testing RN).
I didn't do de-duplication between pages yet, that will be done in the next diff.
Overview of changes:
* Extending -> Creating Plugins
* Moved Extending > Other platforms to Setup > Other platforms (as this is about clients, not plugins)
* Moved Internal FB plugin development stuff into Creating Plugins
* Separated Creating Plugins into ‘Tutorial’, Desktop API Reference, Cient API Reference, Workflow
* Remove TypeScript strict page, we are already strict
* Moved QPL linters to api docs and named id QPL lints
* Grouped the different pages on extending Layout plugin (needs deduping still)
* Warning about avoiding custom styling in general
* Moved internal index page to the top of the navigation of FB Internal, rather than at the bottom
Reviewed By: passy
Differential Revision: D25585172
fbshipit-source-id: ba2aa891395097d6aa101809084b915f115ee69d
Summary: The 'extending flipper' introduction page didn't contain anything meaty, so collapsed it into the tutorial introduction, cleaning up the top level navigation.
Reviewed By: passy
Differential Revision: D25531718
fbshipit-source-id: ca0f98186e889e13cb97be8818db3588738e5039
Summary: After this we can inline internal/external content among pages, and safely transclude markdown files that won't be present on GitHub.
Reviewed By: mweststrate
Differential Revision: D25338530
fbshipit-source-id: 3ce4b44081766aca8b52183c2e02a98c5be09a59
Summary: Referencing these from the wiki should be better than copy-pasting so we know they are up-to-date
Reviewed By: passy
Differential Revision: D23564251
fbshipit-source-id: ad90fcaa88c3c638212a277ce49a5faa41cd07df
Summary:
This adds a new npm package "internaldocs-fb-helpers", and shows example usage in the flipper package.
This will stop everyone from having to inline the function definitions everywhere as is currently the case.
(It's using the old internaldocs name, to match the existing docusaurus-plugin-internaldocs-fb package - I don't think that's a big deal.)
It currently exports two methods:
* `fbContent(internalContent, publicContent)`
* Allows you to return internal or external content based on build variant.
* Has named args so you don't accidentally put internal stuff in the external arg.
* `isInternal(): boolean`
* Not strictly necessary, but helps if you want to write your docs using an boolean variable rather than a switching function every time.
* `fbInternalOnly(internalContent)`
* Convenience method for when you want internal content, or nothing.
I could have put these inside the existing docusaurus plugin, but that has docu v2 as a peer dependency, and I want these helpers to work on v1 as well, so made it a standalone package.
Reviewed By: passy
Differential Revision: D23474462
fbshipit-source-id: 22e5be6de2f3233deb298f1542a06e3575b6555a
Summary:
The new version's disableSwitch isn't equivalent to disabling dark mode like it did before. The default is still dark but now there's no way to change it.
This makes the default light again. Would be nice to enable the dark mode switch, we just need someone to make sure the CSS colours have good enough contrast etc. PRs very welcome!
Dark mode:
{F287823751}
Reviewed By: mweststrate
Differential Revision: D23161145
fbshipit-source-id: fa887afbffa8a1e1e753833b2dba618c5f93435f
Summary:
Upgrading to 61 to get support for absolute links with markdown syntax.
All other changes here are required by the new config validators.
Reviewed By: passy
Differential Revision: D23130020
fbshipit-source-id: cadb3c629d6a8e64931a8db0b86621d05ee5c30e
Summary: This is an OSS requirement now.
Reviewed By: mweststrate
Differential Revision: D22549763
fbshipit-source-id: 8666904fff2c1c30ac514ac3af5e5e14e6b73b09
Summary:
Scaffolded some internal Sandy notes and made them only internally available.
Since most of the pipeline was already set up by jknoxville, it is unclear to me if something needs to be done to set up the auto redirect from fbflipper.com
Reviewed By: jknoxville
Differential Revision: D22233534
fbshipit-source-id: 4bdf5535f5745e7e4d335647759c6cf1b7cc73c6
Summary:
We have a bunch of code blocks using languages that aren't rendered by default, so adding syntax highlighting for those languages.
Also, some uses are using the wrong "name" for the language, so I've fixed them.
Reviewed By: mweststrate
Differential Revision: D21974341
fbshipit-source-id: 17146ea5ae4979241c51b3707035470e9742a104
Summary:
Upgrade docusaurus version. This one opens all external links in new tabs so you don't need to remember to do that yourself.
In static docs, all external links must do this, so this makes it no longer error prone.
Reviewed By: nikoant
Differential Revision: D21815718
fbshipit-source-id: c89a17daeb2bace3e14e0997e7442abc032aef89
Summary: 'to' is for internal pages. href is for generic links, and has tweaks such as opening in new tabs and making sure sites work in iframes.
Reviewed By: passy
Differential Revision: D21550098
fbshipit-source-id: 306dd92378ca721c435b9f4f031136fc421cbb81
Summary: Adds a docusaurus plugin to direct fb employees to the internal documentation.
Reviewed By: nikoant
Differential Revision: D21348579
fbshipit-source-id: 5093d68a23ec6ba91c6ae94bf7cb0e58fcf3e7ef
Summary:
Used https://www.brokenlinkcheck.com/broken-links.php#status for now to find broken links and fixed them all.
Would be better to use some automated tool to check this at diff time, but that's not setup yet.
Reviewed By: passy
Differential Revision: D21301702
fbshipit-source-id: f13c8769b15d9f99563fc65dc0544320d07a2bfb
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