-
Notifications
You must be signed in to change notification settings - Fork 203
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 support for building and hosting mdBook content #1293
Comments
This is actually my biggest worry: it's very important to keep a unified UX. I guess it can be simply fixed by adding "rustdoc dark theme" and "rustdoc light theme" in mdbook and then allow enable rustdoc dark, ayu and rustdoc light themes when generating the mdbook. |
My first thought on the URL would be to have it like |
Handling multiple books sounds hard and I think hosting your own site where you can control the styles makes sense at that point.
This should hook in to the rest of the themes I think, the same way rustdoc themes work now. If mdbook has a theme docs.rs doesn't recognize, make no change.
I think for an MVP we can just have no plugins and add them later if people want them. |
See also rust-lang/rust#66249 |
Motivation
One of the best aspects of docs.rs is that it encourages developers to create high-quality API-focused documentation by removing roadblocks around building and hosting the generated content.
I think it would be wonderful to extend this concept to building and hosting longer-form documentation produced by mdBook. This will encourage developers to produce this style of content as a complement to the rustdoc-generated documentation.
Guide-level explanation
Add this to your Cargo.toml:
Push your code to crates.io
After a bit, visit
https://docs.rs/book/crate-name/x.y.z
Drawbacks
Unresolved questions
https://docs.rs/book/crate-name/x.y.z
https://docs.rs/crate-name/book/x.y.z
https://docs.rs/crate-name/x.y.z/book-name
(wherebook-name
is the name of the book, not a hard-coded string)Future possibilities
Please feel free to edit this summary comment!
The text was updated successfully, but these errors were encountered: