rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
96.44k stars 12.46k forks source link

Integrate mdbook into rustdoc #66249

Open Ppjet6 opened 4 years ago

Ppjet6 commented 4 years ago

It doesn't seem to be possible to include external markdown files without using include_file!. By this I mean your file would have to be included in your code hierarchy and it's not possible to have it as a separate hierarchy.

This could be useful for getting-started (even though usually included in the README), debugging-tips, or various tutorials.

A few ideas where this could be used:

Ppjet6 commented 4 years ago

@kinnison, @GuillaumeGomez

steveklabnik commented 4 years ago

There has long been a suggestion for "integrate mdbook into rustdoc and/or cargo doc", but I cannot find the existing ticket I thought we had.

GuillaumeGomez commented 4 years ago

I think this is a good idea and something we might want to have on the long-term. However it brings some questions:

Ppjet6 commented 4 years ago

@kinnison also raised the question of what to do with these links in reexported symbols (when they reference some file local to the repo that isn't in the one that reexports).

jyn514 commented 3 years ago

This is doc(include), right? If so I think it should be closed in favor of https://github.com/rust-lang/rust/issues/44732.

steveklabnik commented 3 years ago

@jyn514 sorta; you can take it that way, or you can take it as "be able to make mdbooks with rustdoc too", that is, expanding rustdoc to not just be for API documentation, but for all documentation in your project.

jyn514 commented 3 years ago

Related: https://github.com/rust-lang/mdBook/issues/1356

Susurrus commented 3 years ago

There is a related bug to this against Cargo as well: rust-lang/cargo#739