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

RFC: one mdBook to rule them all #7653

Conversation

matklad
Copy link
Contributor

@matklad matklad commented Sep 20, 2022

In this PR, I want to draft how we could centralize all our dev docs in a single, publicly accessible and publicly editable location.

In this PR I want us to agree on:

  • centralizing all dev docs in single location
  • using mdBook as a specific medium for the documentation.

To this end I:

  • fleshed out the landing page of the book. Does it make sense to you?
  • moved over some existing md docs: style and architecture
  • moved one doc from confluence: gc.

See the rendered version here: https://matklad.github.io/nearcore/

Note the edit button as well:

image

@matklad matklad force-pushed the m/i-have-always-imagined-that-paradise-will-be-a-kind-of-library branch from 2c957ac to 1d66818 Compare September 20, 2022 21:01
@akhi3030
Copy link
Collaborator

This is absolutely brilliant. I am in full support for moving full steam ahead on this.

@mm-near
Copy link
Contributor

mm-near commented Sep 21, 2022

how did you upload the images?

@matklad
Copy link
Contributor Author

matklad commented Sep 21, 2022

This is absolutely brilliant. I am in full support for moving full steam ahead on this.

I don't think this is absolutely brilliant, there's certainly some drawbacks:

  • no lightweight comments
  • no wiswig
  • media management is worse than just drag'n'dropping images.

how did you upload the images?

Yeah, this is an important bit. For .svg illustrations, I put them in the media folder. I think we probably should try to stick to .svg as possible.

For .png illustrations, it would be possble to put them in media, but I'd rather not. I think it's important to try to keep repo size reasonable. So I use my standard trick here: host images on github: matklad#2

And yeah, this is the policy I'd love to propose:

  • default to .svg
  • if there's a need to embed something more binary, host it "elsewhere", where the default "elsewhere" is a "media" issue in this repo

@nagisa
Copy link
Collaborator

nagisa commented Sep 21, 2022

Worth noting that SVG isn’t always quite lightweight either. And unfortunately making modifications to an SVG will likely result in a non-trivial diff, unless the change is made by modifying the XML directly.

In the past for things like graphs I used mdbook-mermaid, and my belief is that this is the most appropriate way to make graphs actually editable and reviewable. I don’t think this is a requirement though.


Overall, I have had quite a good experience with mdbook personally, so 👍 from me on the general direction.

Copy link
Collaborator

@bowenwang1996 bowenwang1996 left a comment

Choose a reason for hiding this comment

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

This is epic! I like the name of the branch :)

Until we catchup to the gc_stop.


(the original drawings for this document are here: <https://docs.google.com/document/d/1BiEuJqm4phwQbi-fjzHMZPzDL-94z9Dqkc3XPNnxKJM/edit?usp=sharing>)
Copy link
Collaborator

Choose a reason for hiding this comment

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

This document isn't publicly accessible right? Should we remove the link?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, we should do something here once we actually merge this stuff, I choose not to think about this yet.

That being said, I suggest not worrying about leaving some links to private stuff:

  • this should be low-effort-to-write kind of docs
  • if link is broken for someone, they'll bug us

@matklad
Copy link
Contributor Author

matklad commented Sep 22, 2022

Chatted with marcin about images, the current solution is OK. So, I consider the RFC accepted and would move to implementation work, which is tracked at #7670

@matklad matklad closed this Sep 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants