Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docusaurus for website #491

Merged
merged 4 commits into from
Jan 23, 2018
Merged

Add docusaurus for website #491

merged 4 commits into from
Jan 23, 2018

Conversation

DanielMSchmidt
Copy link
Contributor

@DanielMSchmidt DanielMSchmidt commented Jan 6, 2018

Hi there,

I would like to share this early with you to get and give a bit of feedback. Here are my thoughts:

  • It was fairly easy to get us migrated to docusaurus and the docs look a lot nicer
  • It will be easy to get these build running automatically to update our website. (I did it in another project, should work just fine)
  • We would need to settle on a color and a logo would be super nice 🤔
  • My idea was to generate the documentation pages from jsdoc comments in our source code. This didn't end well; I tried documentation, catharsis, jsdoc-to-json-schema and doctrine without getting JSON data which had the name of the function, and the comments information accessible (at least I didn't get it working).
  • My learning from that is that especially with our current level of abstraction it might be hard to get a meaningful documentation.
  • jsdoc-to-markdown might be an option, but in it's current form it does not support ES6 syntax. I think this is patchable, will invest some open source time into it 👍

You can see the current state by going into website/ and run npm install && npm start and see http://localhost:3000

@rotemmiz
Copy link
Member

rotemmiz commented Jan 8, 2018

Nice, the site actually looks usable already! good job!

Can you please remove the generated code from git ? We might need to create a gh-pages setup.

@DanielMSchmidt
Copy link
Contributor Author

Yeah, if you'd like I would do it in one step with automating travis to build a new version based of master ;)

@rotemmiz
Copy link
Member

rotemmiz commented Jan 8, 2018

Is there a way to toggle docs between api versions? Or at least annotate on an api function which versions support it?
Can we add side by side manuals for iOS and Android like they have in RN's doc site?

@DanielMSchmidt
Copy link
Contributor Author

DanielMSchmidt commented Jan 9, 2018

@rotemmiz

Is there a way to toggle docs between api versions?

Not build-in, I would check out if you can have multiple builds, e.g. one build per version in a folder.
That way we could "just" link to the old docs at some UI Element and the user can select his version and see up-to-date docs.

Can we add side by side manuals for iOS and Android like they have in RN's doc site?

Yes we can do that for the setup page, e.g.

My Plan with this would be

  • Remove generated code from git
  • Get automated travis run on master running
  • Get automated travis run for all tags running (meaning I would need to cherrypick this PR onto each tag 🤔 )We can use this for versioning
  • Get linking from main doc to the versioned docs done right
  • Introduce side-by-side capability on the example of the setup

Does this plan sound right to you? If you give me a quick 👍 I will move this to the project cards and start working on amazing docs 🎉

By the way, could you find us anyone who would be willing to design this page a bit more (in terms of colors and maybe a logo)? I left the default color, because I have no idea 🎨

@DanielMSchmidt DanielMSchmidt force-pushed the docusaurus branch 3 times, most recently from f239412 to 4f2173b Compare January 14, 2018 19:58
@DanielMSchmidt
Copy link
Contributor Author

This should generate a new gh-pages branch on each commit to master. Travis is restricted to master here, so you will only see it once we merge this. (I tried it on my repo and that worked just fine, see the result in gh-pages 👍 ).

Versioning

Docusaurus comes with a version feature. That means we can run npm run version 7.X once we release 7.X

The structure is like this:

  • wix.github.io/detox/docs: latest version (currently 6.X)
  • wix.github.io/detox/docs/6.X: will always point to version 6.X
  • wix.github.io/detox/docs/next: current master branch

It will be easy to build a switch between old API versions, I'll do it once we have this merged and have this problem.

@DanielMSchmidt
Copy link
Contributor Author

@rotemmiz is the side by side functionality a must have for the PR merge for you? I would pause the work on this for now in favor of getting the code generation a bit further ;) I think it will be fairly easy to add

@rotemmiz
Copy link
Member

Amazing job! I'll try to get this merged (and fix broken master build) tomorrow morning.

@DanielMSchmidt
Copy link
Contributor Author

DanielMSchmidt commented Jan 16, 2018 via email

@rotemmiz rotemmiz merged commit 6a5b528 into master Jan 23, 2018
@DanielMSchmidt DanielMSchmidt deleted the docusaurus branch January 23, 2018 22:09
@DanielMSchmidt
Copy link
Contributor Author

Awesome!

@DanielMSchmidt
Copy link
Contributor Author

The side-by-side component is developed in #587

@wix wix locked and limited conversation to collaborators Jul 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants