Commit Graph

41 Commits

Author SHA1 Message Date
Anton Kastritskiy
013e964287 fix 404 pages
Reviewed By: jknoxville, passy

Differential Revision: D37614048

fbshipit-source-id: 58593b45193382ccdcc8a7eeb77335e663e8eb95
2022-07-05 08:19:08 -07:00
Anton Kastritskiy
2d4ae3961a update docusaurus to v2.0.0-beta.21
Reviewed By: passy

Differential Revision: D37377632

fbshipit-source-id: 3cb3f9801db393dfb4b6fef6c92f758a8be55e84
2022-06-23 08:41:12 -07:00
Kevin Strider
0b16f3a031 NEW troubleshooting section (SetUp)
Summary: Restyle of Trobleshooting, which involved changes to sidebar.js and splitting up the previous troubleshooting page into five separate pages.

Reviewed By: lblasa

Differential Revision: D36282539

fbshipit-source-id: e60834e2b4d98b70b23bb11309c3438d85e4de0e
2022-05-11 08:58:34 -07:00
dmitryvinn
70eab186aa docs: add social banner in support of Ukraine (#3496)
Summary:
Our mission at [Meta Open Source](https://opensource.facebook.com/) is to empower communities through open source, and we believe that it means building a welcoming and safe environment for all. As a part of this work, we are adding this banner in support for Ukraine during this crisis.

![image](https://user-images.githubusercontent.com/12485205/156651121-b1479b59-a4e7-4a5c-b8d5-4265aa0aea7a.png)

Pull Request resolved: https://github.com/facebook/flipper/pull/3496

Test Plan:
Imported from GitHub, without a `Test Plan:` line.

**Static Docs Preview: staticdocs**
|[Full Site](https://our.intern.facebook.com/intern/staticdocs/eph/D34622802/V3/staticdocs/)|

|**Modified Pages**|

**Static Docs Preview: flipper**
|[Full Site](https://our.intern.facebook.com/intern/staticdocs/eph/D34622802/V3/flipper/)|

|**Modified Pages**|

Reviewed By: mweststrate

Differential Revision: D34622802

Pulled By: passy

fbshipit-source-id: a18c0de24a6a6c2311aef9a046fe65d917ce6f9d
2022-03-04 09:20:27 -08:00
Pascal Hartig
07ee7fa706 Add Support Ukraine banner
Summary:
Inspired by https://github.com/facebook/react-native-website/pull/2988

Changelog: Add Support Ukraine banner to website

Reviewed By: antonk52, aigoncharov

Differential Revision: D34627820

fbshipit-source-id: 61f69984451c504eca9a6f5e55f30d968344129e
2022-03-04 03:25:42 -08:00
Anton Nikolaev
f3869bc575 Fix loading of google anaytics script
Summary:
Flipper docs were loading really slowly and I found in dev tools that was becuase of requests to scripts specified in docusaurus config which were not found because of relative urls used. This diff fixes that by specifying absolute URL for script loading.
{F696549860}

Reviewed By: jknoxville

Differential Revision: D33845659

fbshipit-source-id: 5079dba442f5fdf4b4f3b2a64146535b39ea72a4
2022-01-28 09:47:22 -08:00
Anton Nikolaev
a3f070c1b9 Fix docs site resource load errors
Summary: I noticed an error on loading "google-anaytics" script, "code-blocks-buttons" script and "network.png" screenshot (which is supposed to be a part of carousel on the main page) in dev console when Flipper docs website is opened. This diff fixes them. Looks like it positively affects load speed as well because each of these failed requests takes 1-2 seconds to resolve before the failure status returned.

Reviewed By: mweststrate

Differential Revision: D33313293

fbshipit-source-id: a1f6357d89121eefa2df9aeae783cd48bc3beaf5
2021-12-29 02:30:20 -08:00
Andres Suarez
79023ee190 Update copyright headers from Facebook to Meta
Reviewed By: bhamodi

Differential Revision: D33331422

fbshipit-source-id: 016e8dcc0c0c7f1fc353a348b54fda0d5e2ddc01
2021-12-27 14:31:45 -08:00
Pascal Hartig
78990eb2c1 Update copyright note on homepage
Reviewed By: nikoant

Differential Revision: D32624845

fbshipit-source-id: 741fbc591cbff453f873328bd580f17f7f23d0b9
2021-11-24 06:27:12 -08:00
Anton Kastritskiy
7d4a6437ef Force trailing slash for flipper website
Summary: Use docusaurus new config option to force trailing slashes for all routes and fail build when extensions are not specified in markdown links to prevent flapping urls that lead to 404 in certain situations.

Reviewed By: jknoxville

Differential Revision: D32533292

fbshipit-source-id: a2d5fdff396b3bb4319893634dd637275ea9f598
2021-11-18 09:32:30 -08:00
John Knox
1dc3c03b12 Fix flipper site code links
Summary: This has to be set so codehub and vscode links get the right prefix

Reviewed By: passy

Differential Revision: D32205617

fbshipit-source-id: d60dcd5bcc5a9194c22e2a27e7b9980034a6f010
2021-11-05 09:47:34 -07:00
Michel Weststrate
f307566318 Public H2 2021 blog post
Summary: Share our Flipper plans with the wider community

Reviewed By: passy

Differential Revision: D31052965

fbshipit-source-id: 50c965be4b47e7375d023c3a307902a205e8b939
2021-10-14 02:41:31 -07:00
John Knox
23682f914f Enable and document code snippet links
Summary: ^

Reviewed By: nikoant

Differential Revision: D30573928

fbshipit-source-id: 6b0a15d565b2c65891762e141b19d6bed14a9673
2021-08-26 07:00:27 -07:00
John Knox
e14f3b2368 Document code snippets baseDir
Summary: Explained how to use baseDir, and also made the site actually use proper code snippets, embedding the flipper site as an example.

Reviewed By: fabiomassimo

Differential Revision: D30572679

fbshipit-source-id: aae3dd07225eb9e147f8bf73529b02bfcb6be9d2
2021-08-26 04:02:44 -07:00
Pascal Hartig
781df776f2 Rename default branch references to main (#2689)
Summary:
I really hope I hit everything and didn't break anything that wasn't
referring to branch names.

Pull Request resolved: https://github.com/facebook/flipper/pull/2689

Test Plan:
_eyes

CI

|[Site Preview: flipper](https://our.intern.facebook.com/intern/staticdocs/eph/D30305789/V2/flipper/)

Reviewed By: timur-valiev

Differential Revision: D30305789

Pulled By: passy

fbshipit-source-id: 5daaa09250bb96bb50be679fc01dae86c666eb73
2021-08-13 15:00:39 -07:00
Adetomiwa Adesanya
abfa50c232 Enable Inpage Editor On flipper sites.
Summary: The inpage editor is now enabled on flipper sites {emoji:1f973}{emoji:1f973}.

Reviewed By: jknoxville

Differential Revision: D29694782

fbshipit-source-id: 7683892adfd54c2ec6644b1a0ead45124692cf8e
2021-07-14 05:28:10 -07:00
Anton Nikolaev
039d3a4a08 Move plugin docs to plugin folders
Summary: Moved plugin documentation and related assets to plugin folders, fixed links and configured redirects where required. Now these docs are used for both showing docs in Flipper and generating Flipper docs website.

Reviewed By: passy

Differential Revision: D29465567

fbshipit-source-id: 3ec4240b215b0d5baea5154f64266a9ba7ead3a5
2021-06-29 17:40:38 -07:00
Anton Nikolaev
e4fb2907fd Auto-generate plugin docs
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
2021-06-29 13:02:05 -07:00
Bartosz Kaszubowski
40e6cdebb1 improve docs code blocks highlighting (#2049)
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
2021-03-29 02:46:11 -07:00
Bartosz Kaszubowski
b38474b73a use splash gradient in footer, switch to GitHub icon (#1998)
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
2021-03-08 11:24:03 -08:00
John Knox
2e81955eae Fix redirect from wiki
Summary: Created from Diffusion's 'Open in Editor' feature.

Reviewed By: nikoant

Differential Revision: D25952493

fbshipit-source-id: 0509b9e0118afcab4e286757131bfa10cfc920b0
2021-01-19 05:59:14 -08:00
John Knox
c460cb767f Fix deleted page redirects
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
2021-01-05 09:24:48 -08:00
John Knox
77ffe1d47b Rename FB Internal to Under the Hood
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
2020-12-17 08:32:51 -08:00
John Knox
df99ba3606 Add internal wiki pages
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
2020-12-17 08:32:50 -08:00
Michel Weststrate
32a75ecb58 Restructure extending docs
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
2020-12-16 05:55:23 -08:00
Michel Weststrate
d08aa5d33e Removed void intro page to the tutorial
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
2020-12-15 08:22:31 -08:00
John Knox
8249498b36 Use static docs preset and upgrade helpers
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
2020-12-07 04:28:30 -08:00
John Knox
142eb8f9ea Add doc markers to code
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
2020-09-07 06:40:30 -07:00
John Knox
f33d4b3f9e Add internaldocs-fb-helpers lib
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
2020-09-07 03:41:10 -07:00
John Knox
c6569470f4 Import internal pages from wiki
Summary:
This is the unadulterated output from running:
`yarn start static-docs-from-wiki --wiki_name Flipper --site_dir xplat/sonar/website`

Reviewed By: passy

Differential Revision: D23241773

fbshipit-source-id: 136e99130c77bedfb66bb31e31a7b331278857bb
2020-08-20 12:48:57 -07:00
John Knox
6e0b407063 Make it light mode by default
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
2020-08-17 06:19:34 -07:00
John Knox
21a7655322 Upgrade docusaurus version
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
2020-08-14 10:33:02 -07:00
Pascal Hartig
4d28524fb4 Add links to legal and privacy
Summary: This is an OSS requirement now.

Reviewed By: mweststrate

Differential Revision: D22549763

fbshipit-source-id: 8666904fff2c1c30ac514ac3af5e5e14e6b73b09
2020-07-16 03:41:46 -07:00
Michel Weststrate
c902a27bce Add Sandy to internal documentation
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
2020-07-01 09:12:36 -07:00
John Knox
62581a588e Add comment markers for live documentation
Reviewed By: passy

Differential Revision: D21998029

fbshipit-source-id: 9eb563dedd2a13de0b4b9798e529c4ad3293560a
2020-06-11 09:32:20 -07:00
John Knox
2a5d1d8ff9 Fix website syntax highlighting
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
2020-06-10 08:44:51 -07:00
John Knox
1895dd111a Upgrade docusaurus
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
2020-06-01 09:05:31 -07:00
John Knox
8e60f4abbb Use href instead of 'to' for external links
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
2020-05-13 09:32:52 -07:00
John Knox
c5cd182ac6 Use docusaurus-plugin-internaldocs-fb
Summary: Adds a docusaurus plugin to direct fb employees to the internal documentation.

Reviewed By: nikoant

Differential Revision: D21348579

fbshipit-source-id: 5093d68a23ec6ba91c6ae94bf7cb0e58fcf3e7ef
2020-05-01 07:03:01 -07:00
John Knox
7e4682b694 Fix the remaining broken links on fbflipper.com
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
2020-04-29 07:33:43 -07:00
John Knox
5f1a0548f5 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
2020-04-27 04:05:01 -07:00