facebook / infer

A static analyzer for Java, C, C++, and Objective-C
http://fbinfer.com/
MIT License
14.97k stars 2.02k forks source link

Migrate Website to Docusaurus 2 Alpha #1171

Closed mishal23 closed 4 years ago

mishal23 commented 5 years ago

Hi there! The Docusaurus team is currently developing Docusaurus 2 and are almost done with an MVP that doesn't include translations and versioning features, which means there's feature parity with your website's current usage of Docusaurus.

Docusaurus 2 brings about many improvements:

I will be helping you migrate and be the POC throughout the migration process. Let me know what you think!

cc @yangshun @endiliey @wgao19

jvillard commented 5 years ago

I am confused: the infer documentation does not use Docusaurus at the moment.

yangshun commented 5 years ago

Hey @jvillard sorry, that was a template statement. In Infer's case, it will be a migration from the current static site generator (Jekyll?) to Docusaurus 2, skipping Docusaurus 1 entirely.

jvillard commented 5 years ago

Nice! Let us know if you need anything from our side.

smorimoto commented 4 years ago

Can I take this?

smorimoto commented 4 years ago

Almost done!

smorimoto commented 4 years ago

Preview here! https://build-9j1y8wnmo.now.sh

smorimoto commented 4 years ago

Some content on the top page has been deleted, but I will add it if necessary. and Should I target the master branch when I submit PR? Or would you like to continue targeting the gh-pages branch?

smorimoto commented 4 years ago

https://github.com/imbsky/infer/tree/docusaurus

yangshun commented 4 years ago

I'd leave that to the @jvillard to decide. Typically for D2 websites, the gh-pages branch should be for the build artifacts and the website code will be in a website directory within master branch.

@mishal23 just FYI that @imbsky has started work on it. @imbsky in future it'd be better to get green light from @mishal23 before taking over the task.

smorimoto commented 4 years ago

Typically for D2 websites, the gh-pages branch should be for the build artifacts and the website code will be in a website directory within master branch.

I will open PR to the master branch.

@imbsky in future it'd be better to get green light from @mishal23 before taking over the task.

Definitely!

smorimoto commented 4 years ago

I decided to use @uetchy's Math API instead of Katex. That's very good.

smorimoto commented 4 years ago

image

jvillard commented 4 years ago

Having the website source on the master branch will be a lot more convenient, thanks!

smorimoto commented 4 years ago

Anytime. I love Infer and am happy to contribute to it even though it's not main Infer code!

yangshun commented 4 years ago

Thank you @imbsky!

smorimoto commented 4 years ago

I'm adding some original top page content now, but it's strictly different from Jekyll, so it may look a little different.

Screen Shot 2019-11-23 at 6 21 50
smorimoto commented 4 years ago

It takes a lot of additional code to fully reproduce an asciinema embed. It should be avoided considering maintainability. For example, it can become a liability the next time we upgrade to Docusaurus 3.

smorimoto commented 4 years ago

For that reason, We can't auto play it at the moment, is that okay? image

yangshun commented 4 years ago

@imbsky make a PR and we can review it. There should be ways to let ASCII cinema still autoplay.

See https://github.com/facebookresearch/hydra/blob/master/website/docs/tutorial/7_tab_completion.md for an example of embedding in the D2 approach. You should just need to set data-autoplay="true" for the added script tag.

smorimoto commented 4 years ago

Autoplay still doesn't work...

smorimoto commented 4 years ago

But it's great because it doesn't open in a new tab.

smorimoto commented 4 years ago

Latest preview here! https://build-8sx47qcn4.now.sh

smorimoto commented 4 years ago

The mobile view in the "Who Uses Infer?" section has also been slightly improved!

yangshun commented 4 years ago

I must say, it looks gorgeous :)

On Fri, Nov 22, 2019 at 2:55 PM BSKY notifications@github.com wrote:

The mobile view in the "Who Uses Infer?" section has also been slightly improved!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/facebook/infer/issues/1171?email_source=notifications&email_token=AAKBCHIMTKZ76EPMDCRRNATQVBPORA5CNFSM4JFWWQ22YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEE7DGQA#issuecomment-557724480, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKBCHJKARWE5HCXJU5VAL3QVBPORANCNFSM4JFWWQ2Q .

smorimoto commented 4 years ago

@jvillard We can install Infer via brew core even if we on Catalina (and Mojave), would you like to fix the install guide to avoid confusion?

smorimoto commented 4 years ago

I increased the font size because the font size in the code block was too small to see.

smorimoto commented 4 years ago
Before After
Screen Shot 2019-11-24 at 22 39 06 Screen Shot 2019-11-24 at 22 39 52
jvillard commented 4 years ago

Docusaurus 2 website is up now, closing. :heart_eyes: