Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Remove mdbook, transition docs to Docusaurus #10806

Closed
wants to merge 27 commits into from
Closed

Conversation

rmshea
Copy link
Contributor

@rmshea rmshea commented Jun 25, 2020

Problem

Gitbook, while it remains a formidable documentation rendering solution, has provided a myriad of issue for our purposes. We're moving back to Solana-hosted and controlled docs with a formal transition to Docusaurus, a React-based Markdown renderer with plenty of flexibility and functionality.

You can see the current Docusaurus implementation here.

Summary of Changes

  • Remove mdbook scripts and other infrastructure
  • Add Docusaurus implementation
  • Remove Gitbook-specific syntax

@rmshea
Copy link
Contributor Author

rmshea commented Jun 27, 2020

@danpaul000 looks like we'll need to adjust the /docs build subsequence. Could use your help to wrap that up—let's sync up on Monday.

@rmshea rmshea mentioned this pull request Jun 28, 2020
@rmshea rmshea linked an issue Jun 28, 2020 that may be closed by this pull request
@mvines
Copy link
Contributor

mvines commented Jun 29, 2020

Docusaurus has no search feature? That's a bummer. I use that in gitbook all the time :-/

@danpaul000
Copy link
Contributor

Why did everything in docs/ move to docs/docs/?

@mvines
Copy link
Contributor

mvines commented Jun 29, 2020

How does the deployment work?

@rmshea
Copy link
Contributor Author

rmshea commented Jun 29, 2020

@mvines Docusaurus does have search — we just have to deploy it first and then we can use https://docsearch.algolia.com/apply/

@rmshea
Copy link
Contributor Author

rmshea commented Jun 29, 2020

@danpaul000 That's how Docusaurus structures their markdown compartmentalization. I can rename the internal folder to whatever you might want, e.g. src

@rmshea
Copy link
Contributor Author

rmshea commented Jun 29, 2020

How does the deployment work?

We can either use GitHub Pages, Netlify, Vercel, or any other static site host. I've used Vercel for the beta.docs.solana.com deployment just for ease of use.

https://v2.docusaurus.io/docs/deployment

@danpaul000
Copy link
Contributor

@danpaul000 That's how Docusaurus structures their markdown compartmentalization. I can rename the internal folder to whatever you might want, e.g. src

Yeah, docs/src/ is preferable. That's where the files currently exist, and would massively reduce the number of touched files in this PR making it easier to focus on the deployment change.

@mvines
Copy link
Contributor

mvines commented Jun 29, 2020

Oh we're going to want to backport this to 1.2, heads up!

@danpaul000
Copy link
Contributor

Oh we're going to want to backport this to 1.2, heads up!

Can we wait on the backport to soak test master and whatever deployment changes? I really don't want to break the main docs branch, we are getting a lot of traffic there lately.

@mvines
Copy link
Contributor

mvines commented Jun 29, 2020

Oh we're going to want to backport this to 1.2, heads up!

Can we wait on the backport to soak test master and whatever deployment changes? I really don't want to break the main docs branch, we are getting a lot of traffic there lately.

💯

mvines
mvines previously requested changes Jun 29, 2020
Copy link
Contributor

@mvines mvines left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll review again once docs/src is restored, too much churn here otherwise

@mergify mergify bot dismissed mvines’s stale review June 29, 2020 23:22

Pull request has been modified.

@garious
Copy link
Contributor

garious commented Jun 30, 2020

@rmshea, Rebase?

@garious
Copy link
Contributor

garious commented Jun 30, 2020

@danpaul000, are you working on CI changes for this?

@danpaul000
Copy link
Contributor

@danpaul000, are you working on CI changes for this?

yeah, looking in to it

rmshea added 5 commits June 30, 2020 12:03
* Delete gitattributes and other theme related items
* all docs need to be moved to /docs

* can be changed in the future
* initialize docusaurus repo
* No need to rename the folder! Change a setting and we're all good to
go.
@danpaul000
Copy link
Contributor

Open items for integration:

  • reinstate docs/build.sh for CI with yarn start and/or yarn build and ideally some kind of link checker like we had for mdbook.
  • Make sure set_solana_release_tag.sh and build-cli-usage.sh are called
  • For post-merge CI build, where should static files end up living? Currently yarn build puts them in the .gitignore'd docs/build directory.
  • Need to hook up a publishing tool in CI with perms to write to the solana.com DNS. Currently, @rmshea has done this manually using his personal permissions and the vercel tool. Can this be integrated to be called from buildkite, or a different publishing tool?

I'm not sure what is the right approach to use the native docusaurus versioning setup, which has all versions as separate subdirs, rather than separate branches (https://v2.docusaurus.io/docs/versioning#directory-structure), unless we build this dynamically and push to a docs repo. Their UI for jumping between versions of docs is nice, and doesn't require separate domains, ie beta.docs.solana.com, edge.docs.solana.com. It should look similar to gitbook setup, ie docs.solana.com/v1.2.0, docs.solana.com/v.1.1.0.

@garious I can work on some of this later but don't think I'm going to be able to get it all over the line today. More likely EOW.

--ifm-color-primary-lightest: #abd5c6;
--ifm-code-font-size: 95%;
--ifm-spacing-horizontal: 1em;
--ifm-font-family-base: "Rubik", system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does our style guide offer any different typefaces for multi-paragraph text? Rubik looks great in small chunks on solana.com, but I find it uncomfortable to read in the context of the docs, especially in dark mode.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CriesofCarrots let me ask Raj and see what we can do. I agree with this completely. Maybe we can keep Roboto.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CriesofCarrots let me know if you are a fan of Roboto!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I am!

@rmshea
Copy link
Contributor Author

rmshea commented Jul 2, 2020

@danpaul000 — let me know what you'd like my help with in terms of addressing your items above.

@garious
Copy link
Contributor

garious commented Jul 7, 2020

@danpaul000, any news here? Is this being worked on someplace else?

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.

gitbook
5 participants